From 83161866952dd0bd617da9e121540f6456f3c600 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Apr 2019 15:02:15 +0900 Subject: [PATCH] Clean packed responses --- src/models/repositories/note.ts | 2 +- src/models/repositories/user.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index a2757d3cc8..7a48d24e13 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -148,7 +148,7 @@ export class NoteRepository extends Repository { return reaction.reaction; } - return null; + return undefined; } let text = note.text; diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index fb11778324..87f1589b2f 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -89,9 +89,7 @@ export class UserRepository extends Repository { username: user.username, host: user.host, avatarUrl: user.avatarUrl, - bannerUrl: user.bannerUrl, avatarColor: user.avatarColor, - bannerColor: user.bannerColor, isAdmin: user.isAdmin || undefined, isBot: user.isBot || undefined, isCat: user.isCat || undefined, @@ -121,6 +119,8 @@ export class UserRepository extends Repository { url: profile!.url, createdAt: user.createdAt, updatedAt: user.updatedAt, + bannerUrl: user.bannerUrl, + bannerColor: user.bannerColor, description: profile!.description, location: profile!.location, birthday: profile!.birthday,