Slon/Modules/Api: Add NULL check to SLON_AUTH_ACCOUNT_ID macro

This commit is contained in:
Alec Murphy 2025-03-09 20:34:45 -04:00
parent d5a09373e4
commit 546cbaf18d

View file

@ -1,5 +1,9 @@
#define SLON_API_LOCAL_TIME_OFFSET 3550
#define SLON_AUTH_ACCOUNT_ID U8* account_id = session->auth->@("account_id");
#define SLON_AUTH_ACCOUNT_ID \
U8* account_id = NULL; \
if (session->auth) { \
account_id = session->auth->@("account_id"); \
};
extern @http_response* @slon_activitypub_signed_request(U8* url_string, U8* fetch_buffer, JsonObject* request_object = NULL, I64 verb = SLON_HTTP_VERB_POST, U8* signatory = NULL);