Skip to content

Commit

Permalink
fix(server): set deleting phase for runtime domain and website when d…
Browse files Browse the repository at this point in the history
…eleting app (labring#1613)
  • Loading branch information
0fatal authored Oct 27, 2023
1 parent f659c96 commit 27b0587
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion server/src/gateway/runtime-domain.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ export class RuntimeDomainService {
.collection<RuntimeDomain>('RuntimeDomain')
.findOneAndUpdate(
{ appid: appid },
{ $set: { state: DomainState.Deleted, updatedAt: new Date() } },
{
$set: {
state: DomainState.Deleted,
phase: DomainPhase.Deleting,
updatedAt: new Date(),
},
},
{ returnDocument: 'after' },
)

Expand Down
8 changes: 7 additions & 1 deletion server/src/website/website.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ export class WebsiteService {
.collection<WebsiteHosting>('WebsiteHosting')
.updateMany(
{ appid },
{ $set: { state: DomainState.Deleted, updatedAt: new Date() } },
{
$set: {
state: DomainState.Deleted,
phase: DomainPhase.Deleting,
updatedAt: new Date(),
},
},
)

return res
Expand Down

0 comments on commit 27b0587

Please sign in to comment.