mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Preparing the repository
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
import {baseAuth} from "@/auth/auth";
|
||||
import {Organization} from "@prisma/client";
|
||||
|
||||
export const currentOrganization = async () => {
|
||||
const session = await baseAuth();
|
||||
console.log("mysession", session)
|
||||
if (!session?.organization) {
|
||||
return null;
|
||||
}
|
||||
return session.organization as Organization;
|
||||
}
|
||||
@@ -73,14 +73,13 @@ export const ProjectForm = (props: projectFormProps) => {
|
||||
organizationId: props.organization.id,
|
||||
projectId: props.projectId
|
||||
});
|
||||
console.log(project)
|
||||
|
||||
if (project.data.success) {
|
||||
if (project.data?.success) {
|
||||
toast.success(project.data.actionSuccess.message);
|
||||
router.push(`/dashboard/${props.organization.slug}/projects/${project.data.value.id}`);
|
||||
router.refresh()
|
||||
router.refresh();
|
||||
} else {
|
||||
toast.success(project.data.actionError.message);
|
||||
toast.error(project.data.actionError.message || "Unknown error occurred.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user