diff options
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 7 |
1 files changed, 2 insertions, 5 deletions
| @@ -66,10 +66,9 @@ xs_dict *app_get(const char *id) | |||
| 66 | FILE *f; | 66 | FILE *f; |
| 67 | 67 | ||
| 68 | if ((f = fopen(fn, "r")) != NULL) { | 68 | if ((f = fopen(fn, "r")) != NULL) { |
| 69 | xs *j = xs_readall(f); | 69 | app = xs_json_load(f); |
| 70 | fclose(f); | 70 | fclose(f); |
| 71 | 71 | ||
| 72 | app = xs_json_loads(j); | ||
| 73 | } | 72 | } |
| 74 | 73 | ||
| 75 | return app; | 74 | return app; |
| @@ -124,10 +123,8 @@ xs_dict *token_get(const char *id) | |||
| 124 | FILE *f; | 123 | FILE *f; |
| 125 | 124 | ||
| 126 | if ((f = fopen(fn, "r")) != NULL) { | 125 | if ((f = fopen(fn, "r")) != NULL) { |
| 127 | xs *j = xs_readall(f); | 126 | token = xs_json_load(f); |
| 128 | fclose(f); | 127 | fclose(f); |
| 129 | |||
| 130 | token = xs_json_loads(j); | ||
| 131 | } | 128 | } |
| 132 | 129 | ||
| 133 | return token; | 130 | return token; |