Skip to content

Commit bff7df6

Browse files
committed
fix: address code review comments
1 parent 06ac4aa commit bff7df6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/auth/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
import logging
33
import os
44
import urllib.parse
5-
from typing import Literal
65

76
import requests # TODO: make this async
87
import xmltodict
9-
from fastapi import APIRouter, BackgroundTasks, Body, HTTPException, Request, Response
8+
from fastapi import APIRouter, BackgroundTasks, HTTPException, Request, Response
109
from fastapi.responses import JSONResponse, PlainTextResponse, RedirectResponse
1110

1211
import database

src/constants.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
# TODO(future): replace new.sfucsss.org with sfucsss.org during migration
44
# TODO(far-future): branch-specific root IP addresses (e.g., devbranch.sfucsss.org)
5-
FRONTEND_ROOT_URL = "http://localhost:8080" if os.environ.get("LOCAL") == "true" else "https://sfucsss.org"
6-
GITHUB_ORG_NAME = "CSSS-Test-Organization" if os.environ.get("LOCAL") == "true" else "CSSS"
7-
IS_PROD = os.environ.get("LOCAL") == "false"
5+
ENV_LOCAL = os.environ.get("LOCAL")
6+
IS_PROD = False if not ENV_LOCAL or ENV_LOCAL.lower() != "true" else True
7+
GITHUB_ORG_NAME = "CSSS-Test-Organization" if not IS_PROD else "CSSS"
88

99
W3_GUILD_ID = "1260652618875797504"
1010
CSSS_GUILD_ID = "228761314644852736"
11-
ACTIVE_GUILD_ID = W3_GUILD_ID if os.environ.get("LOCAL") == "true" else CSSS_GUILD_ID
11+
ACTIVE_GUILD_ID = W3_GUILD_ID if not IS_PROD else CSSS_GUILD_ID
1212

1313
SESSION_ID_LEN = 512
1414
# technically a max of 8 digits https://www.sfu.ca/computing/about/support/tips/sfu-userid.html
@@ -28,5 +28,5 @@
2828
GITHUB_USERNAME_LEN = 39
2929

3030
# COOKIE
31-
SAMESITE=None if IS_PROD else "lax"
31+
SAMESITE="none" if IS_PROD else "lax"
3232
DOMAIN=".sfucsss.org" if IS_PROD else None

0 commit comments

Comments
 (0)