From 62e6bbdc275ecc1d91bb8d77ad047e400754f23b Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Tue, 12 Dec 2023 05:55:35 -0800 Subject: [PATCH] fix: instance status capitalization --- src/mothership-app/pb_hooks/src/instances-delete.pb.js | 2 +- src/mothership-app/pb_hooks/src/signup.pb.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mothership-app/pb_hooks/src/instances-delete.pb.js b/src/mothership-app/pb_hooks/src/instances-delete.pb.js index ee0201d5..24d152a8 100644 --- a/src/mothership-app/pb_hooks/src/instances-delete.pb.js +++ b/src/mothership-app/pb_hooks/src/instances-delete.pb.js @@ -49,7 +49,7 @@ routerAdd( throw new BadRequestError(`Not authorized`) } - if (record.get('status') !== 'idle') { + if (record.getString('status').toLowerCase() !== 'idle') { throw new BadRequestError(`Instance must be shut down first.`) } diff --git a/src/mothership-app/pb_hooks/src/signup.pb.js b/src/mothership-app/pb_hooks/src/signup.pb.js index af6a35f5..7d84ee40 100644 --- a/src/mothership-app/pb_hooks/src/signup.pb.js +++ b/src/mothership-app/pb_hooks/src/signup.pb.js @@ -169,7 +169,7 @@ routerAdd( const instance = new Record(instanceCollection) instance.set('subdomain', desiredInstanceName) instance.set('uid', user.get('id')) - instance.set('status', 'Idle') + instance.set('status', 'idle') instance.set('version', '0.19.*') txDao.saveRecord(instance) } catch (e) {