X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fusers%2Fme.ts;h=5a3e9e51a3a63c5179370d42333c1888646e6307;hb=968aaed2066873fc1c39f95168284122d9d15e21;hp=c4e8d8130456b81c2d9e51bd52488cedff210c1d;hpb=a4d2ca071514b4838544f2fd7229d2e8cb9da0d4;p=github%2FChocobozzz%2FPeerTube.git 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' import { MIMETYPES } from '../../../initializers/constants' import { sequelizeTypescript } from '../../../initializers/database' import { sendUpdateActor } from '../../../lib/activitypub/send' -import { deleteActorAvatarFile, updateActorAvatarFile } from '../../../lib/avatar' +import { deleteLocalActorAvatarFile, updateLocalActorAvatarFile } from '../../../lib/avatar' import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user' import { asyncMiddleware, @@ -238,7 +238,7 @@ async function updateMyAvatar (req: express.Request, res: express.Response) { const userAccount = await AccountModel.load(user.Account.id) - const avatar = await updateActorAvatarFile(userAccount, avatarPhysicalFile) + const avatar = await updateLocalActorAvatarFile(userAccount, avatarPhysicalFile) return res.json({ avatar: avatar.toFormattedJSON() }) } @@ -247,7 +247,7 @@ async function deleteMyAvatar (req: express.Request, res: express.Response) { const user = res.locals.oauth.token.user const userAccount = await AccountModel.load(user.Account.id) - await deleteActorAvatarFile(userAccount) + await deleteLocalActorAvatarFile(userAccount) return res.sendStatus(HttpStatusCode.NO_CONTENT_204) }