Skip to content

Commit 3f8e112

Browse files
fix: make public_key and private_key optional in E2E keys response
1 parent 6101980 commit 3f8e112

File tree

1 file changed

+1
-5
lines changed
  • apps/meteor/app/api/server/v1

1 file changed

+1
-5
lines changed

apps/meteor/app/api/server/v1/e2e.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const e2eEndpoints = API.v1
104104
response: {
105105
400: validateBadRequestErrorResponse,
106106
401: validateUnauthorizedErrorResponse,
107-
200: ajv.compile<{ public_key: string; private_key: string }>({
107+
200: ajv.compile<{ public_key?: string; private_key?: string }>({
108108
type: 'object',
109109
properties: {
110110
public_key: { type: 'string' },
@@ -118,10 +118,6 @@ const e2eEndpoints = API.v1
118118
async function action() {
119119
const result = await Users.fetchKeysByUserId(this.userId);
120120

121-
if (!('public_key' in result) || !('private_key' in result)) {
122-
return API.v1.failure('E2E keys not found for user');
123-
}
124-
125121
return API.v1.success(result);
126122
},
127123
)

0 commit comments

Comments
 (0)