completionId: cgen-0d23a470718c41fbb06f2f6a4bbcdd2b
cgen-0d23a470718c41fbb06f2f6a4bbcdd2b
This commit is contained in:
parent
bec0c04d5d
commit
8fbff201c8
1 changed files with 4 additions and 3 deletions
|
|
@ -73,12 +73,13 @@ export default function AdminStaffDirectory() {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Read response body once
|
||||||
|
const result = await response.json();
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const error = await response.json();
|
throw new Error(result.details || result.error || "Failed to seed data");
|
||||||
throw new Error(error.details || error.error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await response.json();
|
|
||||||
setTeamMembers(result.members || []);
|
setTeamMembers(result.members || []);
|
||||||
|
|
||||||
aethexToast.success({
|
aethexToast.success({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue