diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-05-16 15:13:17 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-05-16 15:13:17 +0800 |
commit | 7270c84fe616357da17baca20437ef1113bb87eb (patch) | |
tree | 6bb618daebec4de3bbb32fa0a93e436396cb24e7 /member.c | |
parent | e2d7e962356e6f064ffcb0c23a9d87580d9beaab (diff) |
Replace struct body with const char *[][2]
Diffstat (limited to 'member.c')
-rw-r--r-- | member.c | 51 |
1 files changed, 27 insertions, 24 deletions
@@ -31,33 +31,36 @@ void interchange_member_account(void (*handler)(interchange_response *)) void interchange_member_setaccount(const struct interchange_member *member, void (*handler)(interchange_response *)) { - request(handler, NULL, &(struct body){ 13, { - { "mv_form_profile", "account_change" }, - { "mv_todo", "return" }, - { "mv_nextpage", "member/account" }, - { "mv_check", "Save_database" }, - { "fname", member->fname }, - { "lname", member->lname }, - { "address1", member->address1 }, - { "address2", member->address2 }, - { "city", member->city }, - { "state", member->state }, - { "zip", member->zip }, - { "email", member->email }, - { "phone_day", member->phone_day } - }}, "%s", "process"); + request(handler, NULL, (const char *[][2]){ + "mv_form_profile", "account_change", + "mv_todo", "return", + "mv_nextpage", "member/account", + "mv_check", "Save_database", + "fname", member->fname, + "lname", member->lname, + "address1", member->address1, + "address2", member->address2, + "city", member->city, + "state", member->state, + "zip", member->zip, + "email", member->email, + "phone_day", member->phone_day, + NULL + }, "%s", "process"); } -void interchange_member_changepassword(const char *password_old, const char *password, const char *verify) +void interchange_member_changepassword(const char *password_old, + const char *password, const char *verify) { - request(NULL, NULL, &(struct body){ 6, { - { "mv_action", "return" }, - { "mv_check", "Change_password" }, - { "mv_successpage", "member/service" }, - { "mv_password_old", password_old }, - { "mv_password", password }, - { "mv_verify", verify } - }}, "%s", "member/change_password"); + request(NULL, NULL, (const char *[][2]){ + "mv_action", "return", + "mv_check", "Change_password", + "mv_successpage", "member/service", + "mv_password_old", password_old, + "mv_password", password, + "mv_verify", verify, + NULL + }, "%s", "member/change_password"); } void interchange_member_logout() |