File tree Expand file tree Collapse file tree 4 files changed +16
-11
lines changed
frontend/src/pages/Wrapped Expand file tree Collapse file tree 4 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 7
7
get_valid_db_user ,
8
8
get_valid_github_user ,
9
9
)
10
- from src .constants import OWNER , REPO
10
+ from src .constants import OWNER , REPO , USER_WHITELIST
11
11
from src .data .github .rest import RESTError
12
12
from src .utils import alru_cache
13
13
14
- USER_WHITELIST = [
15
- "torvalds" ,
16
- "yyx990803" ,
17
- "shadcn" ,
18
- "sindresorhus" ,
19
- ]
20
-
21
14
22
15
async def check_github_user_exists (user_id : str ) -> bool :
23
16
return await get_valid_github_user (user_id )
Original file line number Diff line number Diff line change 57
57
]
58
58
TEST_SHA = "ad83e6340377904fa0295745b5314202b23d2f3f"
59
59
60
+ # WRAPPED
61
+
62
+ # example users, don't need to star the repo
63
+ USER_WHITELIST = [
64
+ "torvalds" ,
65
+ "yyx990803" ,
66
+ "shadcn" ,
67
+ "sindresorhus" ,
68
+ ]
60
69
61
70
print ("PROD" , PROD )
62
71
print ("API_VERSION" , API_VERSION )
Original file line number Diff line number Diff line change 1
1
from datetime import date , datetime
2
2
from typing import Any , Dict , List
3
3
4
- from src .constants import API_VERSION
4
+ from src .constants import API_VERSION , USER_WHITELIST
5
5
from src .data .mongo .main import USER_MONTHS
6
6
from src .data .mongo .user_months .models import UserMonth
7
7
from src .models import UserPackage
@@ -28,7 +28,10 @@ async def get_user_months(
28
28
months_data : List [UserMonth ] = []
29
29
for month in months :
30
30
date_obj : datetime = month ["month" ]
31
- complete = not (date_obj .year == today .year and date_obj .month == today .month )
31
+ complete = (
32
+ not (date_obj .year == today .year and date_obj .month == today .month )
33
+ or user_id in USER_WHITELIST
34
+ )
32
35
try :
33
36
data = UserPackage .decompress (month ["data" ])
34
37
months_data .append (
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ const WrappedScreen = () => {
101
101
< div className = "w-full h-auto flex flex-row flex-wrap -mb-4" >
102
102
{ ! downloadLoading && (
103
103
< Link to = "/" >
104
- < LeftArrowIcon className = "hidden md:absolute ml-2 mt-2 h-8 w-8 text-gray-500 hover:text-gray-800" />
104
+ < LeftArrowIcon className = "hidden md:block absolute ml-2 mt-2 h-8 w-8 text-gray-500 hover:text-gray-800" />
105
105
</ Link >
106
106
) }
107
107
< p className = "text-xl font-semibold text-center w-full" >
You can’t perform that action at this time.
0 commit comments