1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-06-30 06:30:11 +02:00

fix: replace "pingvin share" with dynamic app name

This commit is contained in:
Elias Schneider 2023-03-12 20:13:55 +01:00
parent 0ce8b528e1
commit f55aa80516
No known key found for this signature in database
GPG Key ID: 07E623B294202B6C
2 changed files with 5 additions and 3 deletions

View File

@ -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";
@ -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) {
@ -95,7 +97,7 @@ export class AuthTotpService {
const otpURL = totp.keyuri(
user.username || user.email,
"pingvin-share",
this.config.get("general.appName"),
secret
);

View File

@ -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);