-
Notifications
You must be signed in to change notification settings - Fork 15
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
GET /api/v2/schema/<schema_id> #668
Conversation
@@ -24,7 +24,7 @@ export const getSchemas = [ | |||
async (req: Request, res: Response<GetSchemaResponse>) => { | |||
const { query } = parse(req, getSchemasSchema) | |||
|
|||
const schemas = await findSchemasByKind(query.kind) | |||
const schemas = await getSchemasByKind(query.kind) |
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.
Am tempted to say that request functions should have names like getSchemas
and postResult
, etc. Services should be independent of HTTP request language and so use phrasing like createSchema
or findSchemas
or readSchema
.
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.
I made this change to follow the convention you've implemented in your PR....
backend/test/services/schema.spec.ts
Outdated
} | ||
|
||
const Schema: any = vi.fn(() => ({ | ||
save: mockedMethods.save, | ||
})) | ||
Schema.find = mockedMethods.find | ||
Schema.deleteOne = mockedMethods.deleteOne | ||
;(Schema.findOne = mockedMethods.findOne), (Schema.deleteOne = mockedMethods.deleteOne) |
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.
What is going on here?! Put it on multiple lines!
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.
Caused by running npm run style, not sure why
No description provided.