-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplifying gateways' return values #7863
base: develop
Are you sure you want to change the base?
Conversation
Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:
|
Your environment is deployed to https://ocrvs-2520.opencrvs.dev |
@@ -637,7 +596,7 @@ export const resolvers: GQLResolver = { | |||
return taskEntry.resource.id | |||
}, | |||
async confirmRegistration(_, { id }, { headers: authHeader }) { | |||
if (!inScope(authHeader, ['record.confirm-registration'])) { | |||
if (!inScope(authHeader, ['record.confirm-registration'] as unknown as Scope[])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirmRegistration: 'record.confirm-registration' |
as unknown as Scope[]
should be needed
packages/gateway/src/constants.ts
Outdated
@@ -16,7 +16,7 @@ export const AVATAR_API = | |||
|
|||
export const NATIVE_LANGUAGE = (() => { | |||
const languages = env.LANGUAGES.split(',') | |||
return languages.find((language) => language !== 'en') | |||
return languages.find((language: string) => language !== 'en') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter "language" was being implicitly given an any type which was causing an error when i ran the tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff simplifying the endpoints. Small comments to assess
Simplified the return values for the gateways' resolver functions.