review comments

This commit is contained in:
Jori Lallo
2017-10-19 23:30:31 -07:00
parent c1a8e15a52
commit 1fdbf256a7
2 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,7 @@
// @flow
import crypto from 'crypto';
import bcrypt from 'bcrypt';
import uuid from 'uuid';
import { DataTypes, sequelize, encryptedFields } from '../sequelize';
import { uploadToS3FromUrl } from '../utils/s3';
@ -71,7 +72,7 @@ User.prototype.verifyPassword = function(password) {
User.prototype.updateAvatar = async function() {
this.avatarUrl = await uploadToS3FromUrl(
this.slackData.image_192,
`avatars/${this.id}`
`avatars/${this.id}/${uuid.v4()}`
);
};