summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_historic-reserve-summary-del.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/taler-auditor-httpd_historic-reserve-summary-del.c')
-rw-r--r--src/auditor/taler-auditor-httpd_historic-reserve-summary-del.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/auditor/taler-auditor-httpd_historic-reserve-summary-del.c b/src/auditor/taler-auditor-httpd_historic-reserve-summary-del.c
index 373d5d12f..fe5f60a41 100644
--- a/src/auditor/taler-auditor-httpd_historic-reserve-summary-del.c
+++ b/src/auditor/taler-auditor-httpd_historic-reserve-summary-del.c
@@ -1,6 +1,3 @@
-
-
-
/*
This file is part of TALER
Copyright (C) 2024 Taler Systems SA
@@ -23,12 +20,12 @@
MHD_RESULT
TAH_HISTORIC_RESERVE_SUMMARY_handler_delete (struct TAH_RequestHandler *rh,
- struct MHD_Connection *
- connection,
- void **connection_cls,
- const char *upload_data,
- size_t *upload_data_size,
- const char *const args[])
+ struct MHD_Connection *
+ connection,
+ void **connection_cls,
+ const char *upload_data,
+ size_t *upload_data_size,
+ const char *const args[])
{
MHD_RESULT res;
@@ -41,9 +38,8 @@ TAH_HISTORIC_RESERVE_SUMMARY_handler_delete (struct TAH_RequestHandler *rh,
else
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- // TODO: not the correct ec
- TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID,
- "exchange signature invalid");
+ TALER_EC_AUDITOR_URI_MISSING_PATH_COMPONENT,
+ "uri is missing a trailing path component");
if (GNUNET_SYSERR ==
TAH_plugin->preflight (TAH_plugin->cls))
@@ -58,9 +54,9 @@ TAH_HISTORIC_RESERVE_SUMMARY_handler_delete (struct TAH_RequestHandler *rh,
// execute the transaction
qs = TAH_plugin->delete_historic_reserve_summary (TAH_plugin->cls,
- row_id);
+ row_id);
- if (0 == qs)
+ if (0 >= qs)
{
// goes in here if there was an error with the transaction
GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR == qs);
@@ -69,9 +65,8 @@ TAH_HISTORIC_RESERVE_SUMMARY_handler_delete (struct TAH_RequestHandler *rh,
args[1]);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
- // TODO: not the correct ec
- TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID,
- "exchange signature invalid");
+ TALER_EC_AUDITOR_RESOURCE_NOT_FOUND,
+ "resource to be deleted could not be found");
}
@@ -83,5 +78,3 @@ TAH_HISTORIC_RESERVE_SUMMARY_handler_delete (struct TAH_RequestHandler *rh,
return res;
}
-
- \ No newline at end of file