mirror of
https://github.com/standardnotes/server
synced 2026-10-14 03:13:45 -04:00
fix(auth): additional response message to accepting invitation
This commit is contained in:
+4
@@ -116,6 +116,7 @@ describe('AcceptSharedSubscriptionInvitation', () => {
|
||||
}),
|
||||
).toEqual({
|
||||
success: false,
|
||||
message: 'Could not find the subscription invitation. It may have been already accepted or declined.',
|
||||
})
|
||||
|
||||
expect(sharedSubscriptionInvitationRepository.save).not.toHaveBeenCalled()
|
||||
@@ -132,6 +133,8 @@ describe('AcceptSharedSubscriptionInvitation', () => {
|
||||
}),
|
||||
).toEqual({
|
||||
success: false,
|
||||
message:
|
||||
'Could not find the invitee in our user database. Please first register an account before accepting the invitation.',
|
||||
})
|
||||
|
||||
expect(sharedSubscriptionInvitationRepository.save).not.toHaveBeenCalled()
|
||||
@@ -148,6 +151,7 @@ describe('AcceptSharedSubscriptionInvitation', () => {
|
||||
}),
|
||||
).toEqual({
|
||||
success: false,
|
||||
message: 'The person that invited you does not have a running subscription with Standard Notes anymore.',
|
||||
})
|
||||
|
||||
expect(sharedSubscriptionInvitationRepository.save).not.toHaveBeenCalled()
|
||||
|
||||
+4
@@ -37,6 +37,7 @@ export class AcceptSharedSubscriptionInvitation implements UseCaseInterface {
|
||||
if (sharedSubscriptionInvitation === null) {
|
||||
return {
|
||||
success: false,
|
||||
message: 'Could not find the subscription invitation. It may have been already accepted or declined.',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +45,8 @@ export class AcceptSharedSubscriptionInvitation implements UseCaseInterface {
|
||||
if (invitee === null) {
|
||||
return {
|
||||
success: false,
|
||||
message:
|
||||
'Could not find the invitee in our user database. Please first register an account before accepting the invitation.',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +57,7 @@ export class AcceptSharedSubscriptionInvitation implements UseCaseInterface {
|
||||
if (inviterUserSubscriptions.length !== 1) {
|
||||
return {
|
||||
success: false,
|
||||
message: 'The person that invited you does not have a running subscription with Standard Notes anymore.',
|
||||
}
|
||||
}
|
||||
const inviterUserSubscription = inviterUserSubscriptions[0]
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
export type AcceptSharedSubscriptionInvitationResponse = {
|
||||
success: boolean
|
||||
message?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user