feat(authguest): fix codacy issues

This commit is contained in:
Alex Ababii committed 2026-10-13 09:30:52 +02:00
1 parent b266546a45
commit 7cfc601ddb
2 files changed
+8 -2

No files matched your search

+2 -1
View File
@@ -178,7 +178,8 @@ Alias: `.../guestLinks/verify/token`
#### `POST .../guestLinks/renew`
- **Request body:** `{ "permissionId": "<share-id>", "token": "<previous link token>" }`
- **Request body:**
`{ "permissionId": "<share-id>", "token": "<previous link token>" }`
(`token` optional when the session cookie is sent)
- **Authorization:** the share id is required; the body link token or the
session cookie must belong to it, the link token takes precedence
@@ -57,7 +57,12 @@ func TestRenewHandlerWithSessionCookie(t *testing.T) {
require.NoError(t, err)
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(string(body)))
req.AddCookie(&http.Cookie{Name: testCookieName, Value: "session-token"})
req.AddCookie(&http.Cookie{
Name: testCookieName,
Value: "session-token",
HttpOnly: true,
Secure: true,
})
rr := httptest.NewRecorder()
newRenewHandler(t, svcMock)(rr, req)