feat: show shared link view count

This commit is contained in:
Jason Rasmussen
2025-02-18 17:34:51 -05:00
parent 7bf142dc43
commit 8b0684ee9c
15 changed files with 89 additions and 33 deletions
@@ -204,6 +204,12 @@ describe('/shared-links', () => {
);
});
it('should increment the view count', async () => {
const request1 = await request(app).get('/shared-links/me').query({ key: linkWithAlbum.key });
const request2 = await request(app).get('/shared-links/me').query({ key: linkWithAlbum.key });
expect(request2.body.viewCount).toBe(request1.body.viewCount + 1);
});
it('should return unauthorized for incorrect shared link', async () => {
const { status, body } = await request(app)
.get('/shared-links/me')