Skip to content

Commit 32dff55

Browse files
Merge pull request #21 from hackclub/auth-to-api
delete unused openapi files + move auth to api
2 parents 2175348 + 7b4d58f commit 32dff55

File tree

4 files changed

+9
-130
lines changed

4 files changed

+9
-130
lines changed

api/v1/auth/openapi.yaml

Lines changed: 0 additions & 116 deletions
This file was deleted.

main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ async def lifespan(_app: FastAPI):
6969
await engine.dispose() # shutdown
7070

7171

72-
app = FastAPI(lifespan=lifespan, title="Aces Backend API")
72+
app = FastAPI(
73+
lifespan=lifespan,
74+
title="Aces Backend API",
75+
redoc_url=None,
76+
swagger_ui_oauth2_redirect_url=None,
77+
)
7378

7479

7580
@app.exception_handler(RequestValidationError)
@@ -81,7 +86,7 @@ async def validation_exception_handler(_request: Request, exc: RequestValidation
8186
)
8287

8388

84-
app.include_router(auth_router, prefix="/auth", tags=["auth"])
89+
app.include_router(auth_router, prefix="/api/v1/auth", tags=["auth"])
8590
app.include_router(users_router, prefix="/api/v1/users", tags=["users"])
8691
app.include_router(projects_router, prefix="/api/v1/projects", tags=["projects"])
8792

openapi.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

static/login.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h1>Login</h1>
3131
userEmail = formData.get('email');
3232

3333
try {
34-
const response = await fetch('/auth/send_otp', {
34+
const response = await fetch('/api/v1/auth/send_otp', {
3535
method: 'POST',
3636
headers: {
3737
'Content-Type': 'application/json',
@@ -58,7 +58,7 @@ <h1>Login</h1>
5858
const otp = parseInt(formData.get('otp'));
5959

6060
try {
61-
const response = await fetch('/auth/validate_otp', {
61+
const response = await fetch('/api/v1/auth/validate_otp', {
6262
method: 'POST',
6363
headers: {
6464
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)