config token
All checks were successful
Deploy on Master Change / deploy (push) Successful in 39s

This commit is contained in:
2026-07-01 08:04:03 +07:00
parent fd4ab86fff
commit d1411ad1df
8 changed files with 179 additions and 9 deletions

View File

@@ -965,3 +965,20 @@ export const apiExam = {
}>;
},
};
export const apiQldt = {
getToken: async (): Promise<{ token: string }> => {
const res = await staffFetch('/qldt-token');
if (!res.ok) await parseError(res, 'Không tải được token QLĐT');
return res.json();
},
saveToken: async (token: string): Promise<{ ok: boolean; message: string }> => {
const res = await staffFetch('/qldt-token', {
method: 'POST',
body: JSON.stringify({ token }),
});
if (!res.ok) await parseError(res, 'Lưu token thất bại');
return res.json();
},
};