VeuReu commited on
Commit
7a1dae9
·
verified ·
1 Parent(s): eecf731

Update storage/common.py

Browse files
Files changed (1) hide show
  1. storage/common.py +13 -13
storage/common.py CHANGED
@@ -1,14 +1,14 @@
1
- from fastapi import HTTPException
2
- import os
3
-
4
- def validate_token(token: str):
5
- """
6
- Validate the provided token against the HF_TOKEN environment variable.
7
- Raises an HTTPException if validation fails.
8
- """
9
- HF_TOKEN = os.getenv("HF_TOKEN")
10
- if HF_TOKEN is None:
11
- raise RuntimeError("HF_TOKEN environment variable is not set on the server.")
12
-
13
- if token != HF_TOKEN:
14
  raise HTTPException(status_code=401, detail="Invalid token")
 
1
+ from fastapi import HTTPException
2
+ import os
3
+
4
+ def validate_token(token: str):
5
+ """
6
+ Validate the provided token against the HF_TOKEN environment variable.
7
+ Raises an HTTPException if validation fails.
8
+ """
9
+ HF_TOKEN = os.getenv("VEUREU_TOKEN")
10
+ if HF_TOKEN is None:
11
+ raise RuntimeError("HF_TOKEN environment variable is not set on the server.")
12
+
13
+ if token != HF_TOKEN:
14
  raise HTTPException(status_code=401, detail="Invalid token")