1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-05 07:20:13 +01:00

fix: share creation without reverseShareToken

This commit is contained in:
Elias Schneider 2023-02-10 11:47:17 +01:00
parent e3f88d0826
commit b9662701c4
No known key found for this signature in database
GPG Key ID: 07E623B294202B6C

View File

@ -44,7 +44,9 @@ export class ReverseShareService {
return reverseShare.token;
}
async getByToken(reverseShareToken: string) {
async getByToken(reverseShareToken?: string) {
if (!reverseShareToken) return null;
const reverseShare = await this.prisma.reverseShare.findUnique({
where: { token: reverseShareToken },
});