service -> serviceId

This commit is contained in:
Tom Moor
2018-06-01 15:13:05 -04:00
parent b7b5bac5c3
commit 2337b9df7f
12 changed files with 23 additions and 14 deletions

View File

@ -20,7 +20,7 @@ router.post('hooks.unfurl', async ctx => {
if (!user) return;
const auth = await Authentication.find({
where: { serviceId: 'slack', teamId: user.teamId },
where: { service: 'slack', teamId: user.teamId },
});
if (!auth) return;

View File

@ -18,7 +18,7 @@ describe('#hooks.unfurl', async () => {
it('should return documents', async () => {
const { user, document } = await seed();
await Authentication.create({
serviceId: 'slack',
service: 'slack',
userId: user.id,
teamId: user.teamId,
token: '',

View File

@ -52,8 +52,6 @@ describe('#team.update', async () => {
const res = await server.post('/api/team.update', {
body: { token: user.getJwtToken(), name: 'New name' },
});
const body = await res.json();
expect(res.status).toEqual(403);
});