mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
changing restauration to restoration.
This commit is contained in:
@@ -30,11 +30,11 @@ export default async function RoutePage(props: PageParams<{ databaseId: string }
|
||||
databaseId: database.id
|
||||
},
|
||||
include:{
|
||||
restaurations: {}
|
||||
restorations: {}
|
||||
}
|
||||
})
|
||||
|
||||
const restaurations = await prisma.restauration.findMany({
|
||||
const restorations = await prisma.restoration.findMany({
|
||||
where: {
|
||||
databaseId: databaseId,
|
||||
}
|
||||
@@ -42,7 +42,7 @@ export default async function RoutePage(props: PageParams<{ databaseId: string }
|
||||
|
||||
|
||||
const isAlreadyBackup = !!backups.find(backup => backup.status === "waiting");
|
||||
const isAlreadyRestore = !!restaurations.find(restoration => restoration.status === "waiting");
|
||||
const isAlreadyRestore = !!restorations.find(restoration => restoration.status === "waiting");
|
||||
|
||||
const totalBackups = await prisma.backup.count({
|
||||
where: {
|
||||
@@ -79,7 +79,7 @@ export default async function RoutePage(props: PageParams<{ databaseId: string }
|
||||
<DatabaseTabs
|
||||
isAlreadyRestore={isAlreadyRestore}
|
||||
backups={backups}
|
||||
restaurations={restaurations}
|
||||
restorations={restorations}
|
||||
/>
|
||||
</PageContent>
|
||||
</Page>
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user