diff options
| author | jw255 | 2018-04-13 16:35:50 +0100 |
|---|---|---|
| committer | jw255 | 2018-04-13 16:35:50 +0100 |
| commit | a7567c50bbf01e3a8489d732d2825fa01921f2d3 (patch) | |
| tree | 0d57b638c479a138f3b1d058152cab3b6b5cb43b | |
| parent | Merge branch 'trh/gets' of https://gitlab.cs.st-andrews.ac.uk/cs3099group-be-... (diff) | |
| download | medicine-a7567c50bbf01e3a8489d732d2825fa01921f2d3.tar.gz medicine-a7567c50bbf01e3a8489d732d2825fa01921f2d3.zip | |
got it down to 34 errors in the protocol
| -rw-r--r-- | src/FileRouter.ts | 1 | ||||
| -rw-r--r-- | test/integration/protocol.routes.test.ts | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts index b750094..990110a 100644 --- a/src/FileRouter.ts +++ b/src/FileRouter.ts @@ -639,6 +639,7 @@ export class FileRouter { projectName: string ): Promise<void> => { res.locals.project = await Project.findOne({ + include: [{all: true}], where: { name: projectName } diff --git a/test/integration/protocol.routes.test.ts b/test/integration/protocol.routes.test.ts index ca20da9..2a7cf54 100644 --- a/test/integration/protocol.routes.test.ts +++ b/test/integration/protocol.routes.test.ts @@ -170,7 +170,7 @@ describe('routes : protocol', () => { private_user_metadata: types.anything, public_admin_metadata: types.anything, private_admin_metadata: types.anything - }), 401], + }), 200], // TODO types.metadata ['get', '/users/mock_user', { username: types.string, @@ -183,11 +183,11 @@ describe('routes : protocol', () => { private_user_metadata: types.anything, public_admin_metadata: types.anything, private_admin_metadata: types.anything - }, 401], - ['post', '/users/mock_user', null, 401], + }, 200], + ['post', '/users/mock_user', null, 200], ['get', '/users/mock_user/properties', { data: optional(types.anything) - }, 401], + }, 200], ['get', '/current_user', { username: types.string, privileges: array(types.string), |
