Skip to content

Commit

Permalink
fix: replace "pingvin share" with dynamic app name
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Mar 12, 2023
1 parent 0ce8b52 commit f55aa80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions backend/src/auth/authTotp.service.ts
Expand Up @@ -8,6 +8,7 @@ import { User } from "@prisma/client";
import * as argon from "argon2";
import { authenticator, totp } from "otplib";
import * as qrcode from "qrcode-svg";
import { ConfigService } from "src/config/config.service";
import { PrismaService } from "src/prisma/prisma.service";
import { AuthService } from "./auth.service";
import { AuthSignInTotpDTO } from "./dto/authSignInTotp.dto";
Expand All @@ -16,7 +17,8 @@ import { AuthSignInTotpDTO } from "./dto/authSignInTotp.dto";
export class AuthTotpService {
constructor(
private prisma: PrismaService,
private authService: AuthService
private authService: AuthService,
private config: ConfigService
) {}

async signInTotp(dto: AuthSignInTotpDTO) {
Expand Down Expand Up @@ -95,7 +97,7 @@ export class AuthTotpService {

const otpURL = totp.keyuri(
user.username || user.email,
"pingvin-share",
this.config.get("general.appName"),
secret
);

Expand Down
2 changes: 1 addition & 1 deletion backend/src/file/file.controller.ts
Expand Up @@ -51,7 +51,7 @@ export class FileController {
const zip = this.fileService.getZip(shareId);
res.set({
"Content-Type": "application/zip",
"Content-Disposition": contentDisposition(`pingvin-share-${shareId}.zip`),
"Content-Disposition": contentDisposition(`${shareId}.zip`),
});

return new StreamableFile(zip);
Expand Down

0 comments on commit f55aa80

Please sign in to comment.