Skip to content

Commit fd789a6

Browse files
committed
cleanup
1 parent 1014a23 commit fd789a6

File tree

5 files changed

+3
-18
lines changed

5 files changed

+3
-18
lines changed

backend/app/api/routes/items.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def delete_item(
100100
Delete an item.
101101
"""
102102
item = session.get(Item, id)
103-
print(current_user)
104103
if not item:
105104
raise HTTPException(status_code=404, detail="Item not found")
106105
if not current_user.is_superuser and (item.owner_id != current_user.id):

backend/app/api/routes/login.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ def login_access_token(
4141
elif not user.is_active:
4242
raise HTTPException(status_code=400, detail="Inactive user")
4343
access_token_expires = timedelta(minutes=settings.ACCESS_TOKEN_EXPIRE_MINUTES)
44-
r = security.set_auth_cookie(user.id, access_token_expires)
45-
print(r)
46-
return r
44+
return security.set_auth_cookie(user.id, access_token_expires)
4745

4846

4947
@router.post("/login/test-token", response_model=UserPublic)

backend/app/core/security.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def set_auth_cookie(subject: str | Any, expires_delta: timedelta) -> Response:
2828
key="http_only_auth_cookie",
2929
value=access_token,
3030
httponly=True,
31-
max_age=3600,
32-
expires=3600,
31+
max_age=30,
32+
expires=30,
3333
samesite="lax",
3434
secure=True,
3535
domain=None,

frontend/src/client/core/request.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,12 @@ export const sendRequest = async <T>(
205205
): Promise<AxiosResponse<T>> => {
206206
const controller = new AbortController()
207207

208-
// Properly handle form data for URL-encoded submissions
209208
let data = body;
210209

211210
// If we have formData but it's not a FormData instance,
212211
// and Content-Type is application/x-www-form-urlencoded
213212
if (options.formData && !isFormData(options.formData) &&
214213
headers["Content-Type"] === "application/x-www-form-urlencoded") {
215-
// Use URLSearchParams or axios's built-in handling for url-encoded data
216214
const params = new URLSearchParams();
217215
Object.entries(options.formData).forEach(([key, value]) => {
218216
if (value !== undefined && value !== null) {
@@ -232,14 +230,6 @@ export const sendRequest = async <T>(
232230
url,
233231
withCredentials: options.withCredentials ?? config.WITH_CREDENTIALS,
234232
}
235-
236-
console.log("Request config:", JSON.stringify({
237-
url: requestConfig.url,
238-
method: requestConfig.method,
239-
headers: requestConfig.headers,
240-
withCredentials: requestConfig.withCredentials
241-
}));
242-
243233
onCancel(() => controller.abort())
244234

245235
for (const fn of config.interceptors.request._fns) {
@@ -402,7 +392,6 @@ export const request = <T>(
402392
statusText: response.statusText,
403393
body: responseHeader ?? transformedBody,
404394
}
405-
console.log(result)
406395
catchErrorCodes(options, result)
407396

408397
resolve(result.body)

frontend/src/client/sdk.gen.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ export class LoginService {
232232
* @throws ApiError
233233
*/
234234
public static testToken(): CancelablePromise<LoginTestTokenResponse> {
235-
console.log("test token")
236235
return __request(OpenAPI, {
237236
method: "POST",
238237
url: "/api/v1/login/test-token",

0 commit comments

Comments
 (0)