neocities.h

a C library for interacting with Neocities' API
git clone https://github.com/tanguyandreani/neocities.h
Log | Files | Refs | README | LICENSE

commit bc08063b90e3b66f6afcc1a6f976d41659597cbe
parent 693330e26543401d43023840d4dd0eeaea33a701
Author: Tanguy Andreani <dev@tanguy.space>
Date:   Thu, 21 Feb 2019 21:44:25 +0100

Fixed: moved two lines

Diffstat:
Mneocities.h | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/neocities.h b/neocities.h @@ -114,6 +114,9 @@ enum neocities_error neocities_api(const char *apikey, const char *action, char url_with_get_params[500]; + char auth_bearer[22 + 32 + 1] = "Authorization: Bearer "; + strcat(auth_bearer, apikey); + if (tok == NULL) return NEOCITIES_ERR_JSON_TOKENER_NEW; @@ -191,9 +194,6 @@ enum neocities_error neocities_api(const char *apikey, const char *action, } - char auth_bearer[22 + 32 + 1] = "Authorization: Bearer "; - strcat(auth_bearer, apikey); - if (neocities_init(&neocities, 700) != 0) return NEOCITIES_ERR_NEOCITIES_INIT;