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