diff options
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); } |