Update update.ts
This commit is contained in:
parent
96443384fe
commit
4d64fd665e
1 changed files with 2 additions and 2 deletions
|
@ -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 == null || avatar.userId !== user.id) throw new ApiError(meta.errors.noSuchAvatar);
|
||||||
if (!avatar.type.startsWith('image/')) throw new ApiError(meta.errors.avatarNotAnImage);
|
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) {
|
if (avatar.properties.avgColor) {
|
||||||
updates.avatarColor = 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 == null || banner.userId !== user.id) throw new ApiError(meta.errors.noSuchBanner);
|
||||||
if (!banner.type.startsWith('image/')) throw new ApiError(meta.errors.bannerNotAnImage);
|
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) {
|
if (banner.properties.avgColor) {
|
||||||
updates.bannerColor = banner.properties.avgColor;
|
updates.bannerColor = banner.properties.avgColor;
|
||||||
|
|
Loading…
Reference in a new issue