mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-08 03:00:20 +00:00
Refactor business settings: update department-related UI elements, enhance game reset functionality, and improve data handling for business accounts.
This commit is contained in:
1 parent
e0065e885f
commit
dd5dd83737
6 files changed
+143
-87
No files matched your search
@@ -175,9 +175,11 @@ const useGameHook = () => {
|
||||
return response.isSuccess;
|
||||
};
|
||||
|
||||
// Game reset — remove all caches for a game
|
||||
const resetGame = async (gid) => {
|
||||
const response = await API.post(`${cachesEndpoint}/reset?Gid=${gid}`, {});
|
||||
// Game reset — remove all caches for a game (optionally scoped to a subgroup)
|
||||
const resetGame = async (gid, sgid = null) => {
|
||||
let url = `${cachesEndpoint}/reset?Gid=${gid}`;
|
||||
if (sgid !== null) url += `&SGid=${sgid}`;
|
||||
const response = await API.post(url, {});
|
||||
return response.isSuccess;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user