summaryrefslogtreecommitdiff
path: root/admin.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:20:12 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:20:12 +0800
commit7f934ce683df5252fa6350dcc15e187b1c7623cf (patch)
treef600fc0cdfc9f4397580e44044468858167d0aa9 /admin.c
parenta606c79d52d2027afaafd424a25fa6a4598aa8d7 (diff)
Rename remaining icclient to interchange
Diffstat (limited to 'admin.c')
-rw-r--r--admin.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/admin.c b/admin.c
index f284595..a4ea6c1 100644
--- a/admin.c
+++ b/admin.c
@@ -1,19 +1,19 @@
#include <stdlib.h>
#include <stdbool.h>
#include "login.h"
-#include "icclient.h"
-#include "icclient/member.h"
-#include "icclient/ord.h"
-#include "icclient/admin.h"
+#include "interchange.h"
+#include "interchange/member.h"
+#include "interchange/ord.h"
+#include "interchange/admin.h"
-void icclient_admin_login(const char *username, const char *password, void (*handler)(icclient_response *),
- void (*callback)(struct icclient_admin *))
+void interchange_admin_login(const char *username, const char *password, void (*handler)(interchange_response *),
+ void (*callback)(struct interchange_admin *))
{
login(username, password, NULL, "MMLogin", handler, (void (*)(void *))callback);
}
-void icclient_admin_new_admin(const char *username, const char *password, const char *name, bool super,
- enum icclient_admin_group group, void (*handler)(icclient_response *))
+void interchange_admin_new_admin(const char *username, const char *password, const char *name, bool super,
+ enum interchange_admin_group group, void (*handler)(interchange_response *))
{
request(handler, NULL, &(struct body){ 13, {
{ "mv_todo", "set" },
@@ -28,13 +28,13 @@ void icclient_admin_new_admin(const char *username, const char *password, const
{ "username", username },
{ "password", password },
{ "super", super ? "1" : "0" },
- { "groups", group == ICCLIENT_ADMIN_GROUP_CONTENT ? ":CONTENT"
- : group == ICCLIENT_ADMIN_GROUP_MERCH ? ":MERCH" : ":ORDERS" }
+ { "groups", group == INTERCHANGE_ADMIN_GROUP_CONTENT ? ":CONTENT"
+ : group == INTERCHANGE_ADMIN_GROUP_MERCH ? ":MERCH" : ":ORDERS" }
}}, "%s", "ui");
}
-void icclient_admin_new_item(const char *description, const char *comment, const char *price,
- const char *image_path, void (*handler)(icclient_response *))
+void interchange_admin_new_item(const char *description, const char *comment, const char *price,
+ const char *image_path, void (*handler)(interchange_response *))
{
request(handler, NULL, &(struct body){ 15, {
{ "mv_click", "process_filter" },
@@ -63,9 +63,9 @@ void icclient_admin_new_item(const char *description, const char *comment, const
}}, "%s", "admin/item_edit");
}
-void icclient_admin_new_transaction(const struct icclient_ord_order *order,
- const struct icclient_member *member, bool new_customer_id,
- void (*handler)(icclient_response *))
+void interchange_admin_new_transaction(const struct interchange_ord_order *order,
+ const struct interchange_member *member, bool new_customer_id,
+ void (*handler)(interchange_response *))
{
request(handler, NULL, &(struct body){ 12, {
{ "mv_values_space", "order_entry" },
@@ -83,7 +83,7 @@ void icclient_admin_new_transaction(const struct icclient_ord_order *order,
}}, "%s", "process");
}
-void icclient_admin_logout(struct icclient_admin *admin, void (*handler)(icclient_response *))
+void interchange_admin_logout(struct interchange_admin *admin, void (*handler)(interchange_response *))
{
request(handler, NULL, NULL, "%s", "admin/login");
if (admin->name)