feat(server): use base64 shared links (#2633)

* feat(server): use base64 shared links

* fix: handle array values
This commit is contained in:
Jason Rasmussen
2023-06-01 16:56:37 -04:00
committed by GitHub
parent 76a1629e75
commit 4350f9363d
6 changed files with 33 additions and 16 deletions

View File

@@ -60,10 +60,10 @@ export class SharedLinkRepository implements ISharedLinkRepository {
});
}
async getByKey(key: string): Promise<SharedLinkEntity | null> {
async getByKey(key: Buffer): Promise<SharedLinkEntity | null> {
return await this.repository.findOne({
where: {
key: Buffer.from(key, 'hex'),
key,
},
relations: {
assets: true,