diff --git a/apps/chat-service/src/db/WhiteListDbService/domain.ts b/apps/chat-service/src/db/WhiteListDbService/domain.ts index 566040e6d..87f8b0ea0 100644 --- a/apps/chat-service/src/db/WhiteListDbService/domain.ts +++ b/apps/chat-service/src/db/WhiteListDbService/domain.ts @@ -8,8 +8,8 @@ export const WhitelistRecordId = Schema.BigInt.pipe( export type WhitelistRecordId = Schema.Schema.Type export const WhiteListState = Schema.Literal( - 'APROVED', - 'DISAPROVED', + 'APPROVED', + 'DISAPPROVED', 'BLOCKED', 'WAITING', 'CANCELED' diff --git a/apps/chat-service/src/routes/inbox/approveReqest.ts b/apps/chat-service/src/routes/inbox/approveReqest.ts index 2468a4d8d..908efa42b 100644 --- a/apps/chat-service/src/routes/inbox/approveReqest.ts +++ b/apps/chat-service/src/routes/inbox/approveReqest.ts @@ -55,7 +55,7 @@ export const approveRequest = Handler.make(ApproveRequestEndpoint, (req) => yield* _( whitelistDb.updateWhitelistRecordState({ id: whitelistRecord.id, - state: 'APROVED', + state: 'APPROVED', }) ) // make sure to insert the other way around! @@ -63,7 +63,7 @@ export const approveRequest = Handler.make(ApproveRequestEndpoint, (req) => whitelistDb.insertWhitelistRecord({ receiver: senderInbox.id, sender: receiverInbox.publicKey, - state: 'APROVED', + state: 'APPROVED', }) ) } else { @@ -71,7 +71,7 @@ export const approveRequest = Handler.make(ApproveRequestEndpoint, (req) => yield* _( whitelistDb.updateWhitelistRecordState({ id: whitelistRecord.id, - state: 'DISAPROVED', + state: 'DISAPPROVED', }) ) diff --git a/apps/chat-service/src/routes/inbox/requestApproval.ts b/apps/chat-service/src/routes/inbox/requestApproval.ts index 9fefe9c3e..2fe1762ba 100644 --- a/apps/chat-service/src/routes/inbox/requestApproval.ts +++ b/apps/chat-service/src/routes/inbox/requestApproval.ts @@ -47,7 +47,7 @@ const canSendRequest = ({ if ( whitelistRecord.state === 'CANCELED' || whitelistRecord.state === 'WAITING' || - whitelistRecord.state === 'DISAPROVED' + whitelistRecord.state === 'DISAPPROVED' ) { const requestTimeoutDays = yield* _(requestTimeoutDaysConfig) const canBeRequestedAgainFrom = dayjs(whitelistRecord.date).add( diff --git a/apps/chat-service/src/utils/isSenderInReceiverWhitelist.ts b/apps/chat-service/src/utils/isSenderInReceiverWhitelist.ts index 457f60f25..7ccbecf95 100644 --- a/apps/chat-service/src/utils/isSenderInReceiverWhitelist.ts +++ b/apps/chat-service/src/utils/isSenderInReceiverWhitelist.ts @@ -25,7 +25,7 @@ export const isSenderInReceiverWhitelist = ({ ) if (Option.isNone(whitelistRecord)) return false - if (whitelistRecord.value.state === 'APROVED') return true + if (whitelistRecord.value.state === 'APPROVED') return true return false })