From ada4748a25c39b226534ff0475569a8bd25e17ab Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 7 May 2025 18:57:32 +0500 Subject: feat: user actions --- public/emotes/upload.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'public/emotes/upload.php') diff --git a/public/emotes/upload.php b/public/emotes/upload.php index 0b79b5c..42e58c6 100644 --- a/public/emotes/upload.php +++ b/public/emotes/upload.php @@ -389,6 +389,21 @@ if ($is_manual) { } } +$db->prepare("INSERT INTO actions(user_id, action_type, action_payload) VALUES (?, ?, ?)") + ->execute([ + $uploaded_by, + "EMOTE_CREATE", + json_encode([ + "emote" => [ + "id" => $id, + "code" => $code, + "visibility" => $visibility, + "uploaded_by" => $uploaded_by, + ] + ]) + ]); + + $db = null; if (CLIENT_REQUIRES_JSON) { -- cgit v1.2.3