diff options
| author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-05-09 12:47:26 +0800 |
|---|---|---|
| committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-05-09 12:47:26 +0800 |
| commit | 77ded2a3b9142073f1ea74b948ad3219c6b245df (patch) | |
| tree | cc752af009ec36a8e2b572ef59cde422584d645e /admin.c | |
| parent | 813507ca1813ff6cb4ca0a35de4550c6178af235 (diff) | |
Admin clearer, reimplement logout & default next
Diffstat (limited to 'admin.c')
| -rw-r--r-- | admin.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -11,7 +11,8 @@ void interchange_admin_login(const char *username, const char *password, const char *failpage, void (*handler)(interchange_response *), void (*callback)(struct interchange_admin *)) { - login(username, password, NULL, "MMLogin", nextpage, successpage, + login(username, password, NULL, "MMLogin", + nextpage ? nextpage : "admin/index", successpage, failpage, handler, (void (*)(void *))callback); } @@ -86,12 +87,15 @@ void interchange_admin_new_transaction(const struct interchange_ord_order *order }}, "%s", "process"); } -void interchange_admin_logout(struct interchange_admin *admin, void (*handler)(interchange_response *)) +void interchange_admin_logout() +{ + request(NULL, NULL, NULL, "%s", "admin/login"); +} + +void interchange_admin_clear(struct interchange_admin *admin) { - request(handler, NULL, NULL, "%s", "admin/login"); if (admin->name) free(admin->name); if (admin->username) free(admin->username); - free(admin); } |