changing restauration to restoration.

This commit is contained in:
killian-larcher
2024-12-14 17:52:10 +01:00
parent f6852950c8
commit 4cc246514c
11 changed files with 68 additions and 38 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ export async function POST(
return NextResponse.json({error: "Database associated with generatedId provided not found"}, {status: 404})
}
const restoration = await prisma.restauration.findFirst({
const restoration = await prisma.restoration.findFirst({
where: {
status : "ongoing",
databaseId: database.id
@@ -59,7 +59,7 @@ export async function POST(
return NextResponse.json({error: "Unable to fin the corresponding restoration"}, {status: 404})
}
await prisma.restauration.update({
await prisma.restoration.update({
where:{
id : restoration.id
},
+2 -2
View File
@@ -78,7 +78,7 @@ export async function handleDatabases(body: Body, agent: Agent, lastContact: Dat
}
})
const restoration = await prisma.restauration.findFirst({
const restoration = await prisma.restoration.findFirst({
where:{
databaseId: databaseUpdated.id,
status: "waiting"
@@ -108,7 +108,7 @@ export async function handleDatabases(body: Body, agent: Agent, lastContact: Dat
})
const fileName = backupToRestore.file
UrlBackup = await getFileUrlPresignedLocal(fileName)
await prisma.restauration.update({
await prisma.restoration.update({
where: {
id: restoration.id
},