mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 20:44:49 -04:00
fix username spelling from userName
Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
be27686610
commit
40103cb397
23 changed files with 89 additions and 91 deletions
|
@ -50,9 +50,9 @@ export class MeController {
|
|||
for (const mediaUpload of mediaUploads) {
|
||||
await this.mediaService.deleteFile(mediaUpload);
|
||||
}
|
||||
this.logger.debug(`Deleted all media uploads of ${user.userName}`);
|
||||
this.logger.debug(`Deleted all media uploads of ${user.username}`);
|
||||
await this.userService.deleteUser(user);
|
||||
this.logger.debug(`Deleted ${user.userName}`);
|
||||
this.logger.debug(`Deleted ${user.username}`);
|
||||
}
|
||||
|
||||
@Post('profile')
|
||||
|
|
|
@ -56,7 +56,7 @@ export class MediaController {
|
|||
// TODO: Move getting the Note object into a decorator
|
||||
const note: Note = await this.noteService.getNoteByIdOrAlias(noteId);
|
||||
this.logger.debug(
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${user.userName}'`,
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${user.username}'`,
|
||||
'uploadMedia',
|
||||
);
|
||||
const url = await this.mediaService.saveFile(file.buffer, user, note);
|
||||
|
|
|
@ -52,7 +52,7 @@ export class TokensController {
|
|||
@RequestUser() user: User,
|
||||
): Promise<AuthTokenWithSecretDto> {
|
||||
return await this.authService.createTokenForUser(
|
||||
user.userName,
|
||||
user.username,
|
||||
label,
|
||||
validUntil,
|
||||
);
|
||||
|
|
|
@ -100,7 +100,7 @@ export class MediaController {
|
|||
// TODO: Move getting the Note object into a decorator
|
||||
const note: Note = await this.noteService.getNoteByIdOrAlias(noteId);
|
||||
this.logger.debug(
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${user.userName}'`,
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${user.username}'`,
|
||||
'uploadMedia',
|
||||
);
|
||||
const url = await this.mediaService.saveFile(file.buffer, user, note);
|
||||
|
@ -127,7 +127,7 @@ export class MediaController {
|
|||
@RequestUser() user: User,
|
||||
@Param('filename') filename: string,
|
||||
): Promise<void> {
|
||||
const username = user.userName;
|
||||
const username = user.username;
|
||||
try {
|
||||
this.logger.debug(
|
||||
`Deleting '${filename}' for user '${username}'`,
|
||||
|
@ -136,7 +136,7 @@ export class MediaController {
|
|||
const mediaUpload = await this.mediaService.findUploadByFilename(
|
||||
filename,
|
||||
);
|
||||
if (mediaUpload.user.userName !== username) {
|
||||
if (mediaUpload.user.username !== username) {
|
||||
this.logger.warn(
|
||||
`${username} tried to delete '${filename}', but is not the owner`,
|
||||
'deleteMedia',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue