diff --git a/server/src/gateway/runtime-domain.service.ts b/server/src/gateway/runtime-domain.service.ts index 1acae69523..8c2f0fffdd 100644 --- a/server/src/gateway/runtime-domain.service.ts +++ b/server/src/gateway/runtime-domain.service.ts @@ -119,7 +119,13 @@ export class RuntimeDomainService { .collection('RuntimeDomain') .findOneAndUpdate( { appid: appid }, - { $set: { state: DomainState.Deleted, updatedAt: new Date() } }, + { + $set: { + state: DomainState.Deleted, + phase: DomainPhase.Deleting, + updatedAt: new Date(), + }, + }, { returnDocument: 'after' }, ) diff --git a/server/src/website/website.service.ts b/server/src/website/website.service.ts index d4f47fe726..33f97ca3ac 100644 --- a/server/src/website/website.service.ts +++ b/server/src/website/website.service.ts @@ -143,7 +143,13 @@ export class WebsiteService { .collection('WebsiteHosting') .updateMany( { appid }, - { $set: { state: DomainState.Deleted, updatedAt: new Date() } }, + { + $set: { + state: DomainState.Deleted, + phase: DomainPhase.Deleting, + updatedAt: new Date(), + }, + }, ) return res