add user information modal window

This commit is contained in:
smanylov
2026-05-13 14:25:47 +07:00
parent f1954f5f48
commit 9d40df3273
7 changed files with 475 additions and 19 deletions
+37
View File
@@ -28,6 +28,43 @@ export async function fetchUsesData(page: number, size: number, sortBy?: string,
}
});
if (response.ok) {
const parsed = await response.json();
if (parsed.message_code === 0) {
return parsed.message_body.message_body;
} else {
return null;
}
} else {
throw new Error(`${response.status}`);
}
} catch (error) {
return null;
}
}
export async function fetchUsesInfo(userInfo: number) {
console.log('fetchUsesInfo');
try {
const response = await fetch(`${API_BASE_URL}/api/admin/get-users`, {
method: 'POST',
body: JSON.stringify({
version: 1,
msg_id: 30014,
message_body: {
action: 'getIngoById',
user_id: userInfo
}
}),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
if (response.ok) {
const parsed = await response.json();