mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-07 20:44:05 +09:00
fix some errors
This commit is contained in:
1 parent
7516b253e3
commit
b3eae6650e
1 file changed
+4
-3
@@ -39,9 +39,7 @@ export const loadById = async (projectId?: Project["id"]) => {
|
||||
return parseProject(project);
|
||||
};
|
||||
|
||||
export const loadByDomain = async (
|
||||
domain: string
|
||||
): Promise<(Project & { assets: Asset[] }) | null> => {
|
||||
export const loadByDomain = async (domain: string): Promise<Project | null> => {
|
||||
const project = await prisma.project.findUnique({
|
||||
where: { domain },
|
||||
include: { assets: true },
|
||||
@@ -100,9 +98,11 @@ export const create = async ({
|
||||
domain,
|
||||
devTreeId: tree.id,
|
||||
},
|
||||
include: { assets: true },
|
||||
});
|
||||
|
||||
await db.breakpoints.create(tree.id, breakpoints);
|
||||
|
||||
return parseProject(project);
|
||||
};
|
||||
|
||||
@@ -125,6 +125,7 @@ export const clone = async (clonableDomain: string, userId: string) => {
|
||||
domain,
|
||||
devTreeId: tree.id,
|
||||
},
|
||||
include: { assets: true },
|
||||
}),
|
||||
db.props.clone({
|
||||
previousTreeId: clonableProject.prodTreeId,
|
||||
|
||||
Reference in new issue
Block a user