[MOD] Verbosity levels, avatar cleanser

I have a weird bug where Parsee seems to hang on a Db request, been
tryign to figure that otu since a while but can't quite put my finger on
where.
You can have this commit, as a treat.
This commit is contained in:
LDA 2024-08-24 19:36:37 +02:00
commit 692cb8aa6f
19 changed files with 190 additions and 111 deletions

View file

@ -1,37 +0,0 @@
#include <Routes.h>
#include <Cytoplasm/Log.h>
#include <Matrix.h>
#include <AS.h>
RouteHead(RoutePing, arr, argp)
{
ParseeHttpArg *args = argp;
HashMap *request = NULL;
HashMap *response = NULL;
response = ASVerifyRequest(args);
if (response)
{
goto end;
}
if (HttpRequestMethodGet(args->ctx) != HTTP_POST)
{
HttpResponseStatus(args->ctx, HTTP_METHOD_NOT_ALLOWED);
response = MatrixCreateError(
"M_UNRECOGNIZED",
"Path /ping only accepts POST as a valid method."
);
goto end;
}
Log(LOG_INFO, "Pong!");
RequestJSON();
/* TODO: Load ping info */
response = HashMapCreate();
end:
JsonFree(request);
return response;
}

View file

@ -30,7 +30,6 @@ RouteHead(RouteTxns, arr, argp)
RequestJSON();
/* TODO: Do a thing with these. */
events = JsonValueAsArray(HashMapGet(request, "events"));
for (i = 0; i < ArraySize(events); i++)
{