Skip to content

Commit

Permalink
fix: share creation without reverseShareToken
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Feb 10, 2023
1 parent e3f88d0 commit b966270
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/reverseShare/reverseShare.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});
Expand Down

0 comments on commit b966270

Please sign in to comment.