service -> serviceId
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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: '',
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user