Upload avatar to s3 on login

This commit is contained in:
Jori Lallo
2017-10-19 00:49:22 -07:00
parent 0515a6233e
commit 255d7564c5
8 changed files with 111 additions and 17 deletions

View File

@ -47,6 +47,10 @@ router.post('auth.slack', async ctx => {
await team.createFirstCollection(user.id);
}
// Update user's avatar
await user.updateAvatar();
await user.save();
ctx.body = {
data: {
user: await presentUser(ctx, user),