diff --git a/package-lock.json b/package-lock.json index 2c1792b5..0e656a46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,14 +57,6 @@ "glob": "^7.1.3" } }, - "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "requires": { - "lru-cache": "^6.0.0" - } - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -1250,6 +1242,11 @@ "ms": "2.0.0" } }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -2403,9 +2400,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -3102,6 +3099,13 @@ "requires": { "resolve-from": "^2.0.0", "semver": "^5.1.0" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } } }, "resolve-from": { @@ -3190,9 +3194,27 @@ "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=" + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } }, "send": { "version": "0.17.2", @@ -3913,9 +3935,9 @@ }, "dependencies": { "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" } } }, diff --git a/src/core/user/UserRepository.ts b/src/core/user/UserRepository.ts index 5f037a95..1ce6ecb1 100644 --- a/src/core/user/UserRepository.ts +++ b/src/core/user/UserRepository.ts @@ -27,6 +27,7 @@ let UserSchema = new mongoose.Schema({ notificationCheckedAt: Date, // 새로운 알림이 있는지 확인하는 용도 email: String, isEmailVerified: Boolean, + nickname: String, fcmKey: String, // Firebase Message Key // if the user remove its account, active status becomes false @@ -55,6 +56,7 @@ function fromMongoose(mongooseDocument: mongoose.MongooseDocument): User { notificationCheckedAt: wrapper.notificationCheckedAt, email: wrapper.email, isEmailVerified: wrapper.isEmailVerified, + nickname: wrapper.nickname, fcmKey: wrapper.fcmKey, active: wrapper.active, lastLoginTimestamp: wrapper.lastLoginTimestamp, @@ -117,6 +119,7 @@ export function update(user: User): Promise { userDocument.active = user.active; userDocument.lastLoginTimestamp = user.lastLoginTimestamp; userDocument.isEmailVerified = user.isEmailVerified; + userDocument.nickname = user.nickname; userDocument.save(); }) } diff --git a/src/core/user/model/User.ts b/src/core/user/model/User.ts index 4a85f151..7eb87a03 100644 --- a/src/core/user/model/User.ts +++ b/src/core/user/model/User.ts @@ -12,4 +12,5 @@ export default interface User { fcmKey?: string; active?: boolean; lastLoginTimestamp?: number; + nickname?: string; }