mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 18:31:13 -05:00
Refactor: Unify moderation queue for all entities
This commit is contained in:
@@ -64,25 +64,22 @@ const Operators = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await submitCompanyCreation(
|
||||
await submitCompanyCreation(
|
||||
data,
|
||||
'operator',
|
||||
user.id,
|
||||
isModerator()
|
||||
user.id
|
||||
);
|
||||
|
||||
toast({
|
||||
title: result.submitted ? "Operator Submitted" : "Operator Created",
|
||||
description: result.submitted
|
||||
? "Your submission has been sent for review."
|
||||
: "The operator has been created successfully."
|
||||
title: "Operator Submitted",
|
||||
description: "Your submission has been sent for review."
|
||||
});
|
||||
|
||||
setIsCreateModalOpen(false);
|
||||
} catch (error: any) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: error.message || "Failed to create operator.",
|
||||
description: error.message || "Failed to submit operator.",
|
||||
variant: "destructive"
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user