Skip to content

Commit 4fbe43b

Browse files
krish221997sagoez
andauthored
feat: cli update for users create update (#52)
Co-authored-by: Samuel Gomez <[email protected]>
1 parent 10ab862 commit 4fbe43b

File tree

3 files changed

+209
-80
lines changed

3 files changed

+209
-80
lines changed

apps/event-system/services/api/routes/public.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { checkBlacklist } from '@libs-private/utils/security';
66
import { get } from 'lodash';
77
import { IncomingMessage } from 'http';
88

9-
109
export const publicRoute = () => ({
1110
name: 'public',
1211
path: '/public',
@@ -30,6 +29,7 @@ export const publicRoute = () => ({
3029
'v1.stripe-webhook.handleWebhook',
3130

3231
'v3.users.mockOauth',
32+
'v3.users.provider',
3333
],
3434

3535
aliases: {
@@ -56,7 +56,7 @@ export const publicRoute = () => ({
5656
'POST v1/embed-tokens/update': 'v1.embed-tokens.public.update',
5757
'POST v1/stripe-webhook': 'v1.stripe-webhook.handleWebhook',
5858
'POST v3/users/mock-oauth': 'v3.users.mockOauth',
59-
59+
'GET v3/users/oauth/provider/:provider': 'v3.users.provider',
6060
},
6161

6262
cors: {
@@ -119,17 +119,23 @@ export const publicRoute = () => ({
119119
json: {
120120
strict: false,
121121
limit: '5MB',
122-
verify: (req: IncomingMessage, res: any, buf: Buffer, encoding: string | undefined) => {
122+
verify: (
123+
req: IncomingMessage,
124+
res: any,
125+
buf: Buffer,
126+
encoding: string | undefined
127+
) => {
123128
if (req.url === '/v1/stripe-webhook') {
124-
const validEncoding: BufferEncoding = encoding as BufferEncoding || 'utf8';
129+
const validEncoding: BufferEncoding =
130+
(encoding as BufferEncoding) || 'utf8';
125131
(req as any).rawBody = buf.toString(validEncoding);
126132
}
127133
},
128134
},
129135
urlencoded: {
130136
extended: true,
131137
limit: '1MB',
132-
}
138+
},
133139
},
134140

135141
// Mapping policy setting. More info: https://moleculer.services/docs/0.14/moleculer-web.html#Mapping-policy

0 commit comments

Comments
 (0)