Update update.ts

This commit is contained in:
syuilo 2019-04-09 23:40:55 +09:00
parent 2c5e1d2440
commit 7e59e2d6c9

View File

@ -177,7 +177,7 @@ export default define(meta, async (ps, user, app) => {
if (avatar == null || avatar.userId !== user.id) throw new ApiError(meta.errors.noSuchAvatar);
if (!avatar.type.startsWith('image/')) throw new ApiError(meta.errors.avatarNotAnImage);
updates.avatarUrl = avatar.thumbnailUrl;
updates.avatarUrl = DriveFiles.getPublicUrl(avatar, true);
if (avatar.properties.avgColor) {
updates.avatarColor = avatar.properties.avgColor;
@ -190,7 +190,7 @@ export default define(meta, async (ps, user, app) => {
if (banner == null || banner.userId !== user.id) throw new ApiError(meta.errors.noSuchBanner);
if (!banner.type.startsWith('image/')) throw new ApiError(meta.errors.bannerNotAnImage);
updates.bannerUrl = banner.webpublicUrl;
updates.bannerUrl = DriveFiles.getPublicUrl(banner, false);
if (banner.properties.avgColor) {
updates.bannerColor = banner.properties.avgColor;