aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/me.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-26 10:23:21 +0100
committerChocobozzz <me@florianbigard.com>2021-01-26 10:29:57 +0100
commite08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3 (patch)
treeaea8add5a1a93edb0a5aab63588bd358aa9960a3 /server/controllers/api/users/me.ts
parentd223dca0cd50010d1c4455e5eec1736b1c591aed (diff)
downloadPeerTube-e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3.tar.gz
PeerTube-e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3.tar.zst
PeerTube-e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3.zip
Allow webp image uploads
Diffstat (limited to 'server/controllers/api/users/me.ts')
-rw-r--r--server/controllers/api/users/me.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index c4e8d8130..5a3e9e51a 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -11,7 +11,7 @@ import { CONFIG } from '../../../initializers/config'
11import { MIMETYPES } from '../../../initializers/constants' 11import { MIMETYPES } from '../../../initializers/constants'
12import { sequelizeTypescript } from '../../../initializers/database' 12import { sequelizeTypescript } from '../../../initializers/database'
13import { sendUpdateActor } from '../../../lib/activitypub/send' 13import { sendUpdateActor } from '../../../lib/activitypub/send'
14import { deleteActorAvatarFile, updateActorAvatarFile } from '../../../lib/avatar' 14import { deleteLocalActorAvatarFile, updateLocalActorAvatarFile } from '../../../lib/avatar'
15import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user' 15import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user'
16import { 16import {
17 asyncMiddleware, 17 asyncMiddleware,
@@ -238,7 +238,7 @@ async function updateMyAvatar (req: express.Request, res: express.Response) {
238 238
239 const userAccount = await AccountModel.load(user.Account.id) 239 const userAccount = await AccountModel.load(user.Account.id)
240 240
241 const avatar = await updateActorAvatarFile(userAccount, avatarPhysicalFile) 241 const avatar = await updateLocalActorAvatarFile(userAccount, avatarPhysicalFile)
242 242
243 return res.json({ avatar: avatar.toFormattedJSON() }) 243 return res.json({ avatar: avatar.toFormattedJSON() })
244} 244}
@@ -247,7 +247,7 @@ async function deleteMyAvatar (req: express.Request, res: express.Response) {
247 const user = res.locals.oauth.token.user 247 const user = res.locals.oauth.token.user
248 248
249 const userAccount = await AccountModel.load(user.Account.id) 249 const userAccount = await AccountModel.load(user.Account.id)
250 await deleteActorAvatarFile(userAccount) 250 await deleteLocalActorAvatarFile(userAccount)
251 251
252 return res.sendStatus(HttpStatusCode.NO_CONTENT_204) 252 return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
253} 253}