Skip to content

Commit

Permalink
fix(devbox):support use deleted template
Browse files Browse the repository at this point in the history
  • Loading branch information
xudaotutou committed Jan 10, 2025
1 parent af8e841 commit 93a8276
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export async function GET(req: NextRequest) {
const template = await devboxDB.template.findUnique({
where: {
uid,
isDeleted: false,
},
select: {
config: true,
Expand All @@ -36,8 +35,10 @@ export async function GET(req: NextRequest) {
regionUid: true,
isDeleted: true,
isPublic: true,

}
}
},
isDeleted: true
}
})
const regionUid = getRegionUid()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ export async function POST(req: NextRequest) {
}
const templateRepository = await devboxDB.templateRepository.findUnique({
where: {
isDeleted: false,
uid: query.templateRepositoryUid,
regionUid: getRegionUid(),
organizationUid: payload.organizationUid,
regionUid: getRegionUid()
},
select: {
uid: true,
Expand Down

0 comments on commit 93a8276

Please sign in to comment.