diff options
| author | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:44:30 -0600 |
|---|---|---|
| committer | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:44:30 -0600 |
| commit | e40f07211f5f15dcb138e2520a76d13afd3c0cfd (patch) | |
| tree | 46bad6a17e66d55a4a65088c0b6eb8c48641615a /frontend/src/utils/Jwt.ts | |
| parent | added prettier for more consistency (diff) | |
| download | lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.gz lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.bz2 lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.zip | |
formatted with prettier
Diffstat (limited to 'frontend/src/utils/Jwt.ts')
| -rw-r--r-- | frontend/src/utils/Jwt.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/frontend/src/utils/Jwt.ts b/frontend/src/utils/Jwt.ts index ce351fb..affcd36 100644 --- a/frontend/src/utils/Jwt.ts +++ b/frontend/src/utils/Jwt.ts | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | // llm ahh funcs | 1 | // llm ahh funcs |
| 2 | export function get_user_id_from_token(token: string | undefined): string | undefined { | 2 | export function get_user_id_from_token( |
| 3 | token: string | undefined | ||
| 4 | ): string | undefined { | ||
| 3 | if (!token) { | 5 | if (!token) { |
| 4 | return undefined; | 6 | return undefined; |
| 5 | } | 7 | } |
| @@ -19,9 +21,11 @@ export function get_user_id_from_token(token: string | undefined): string | unde | |||
| 19 | .join('') | 21 | .join('') |
| 20 | ); | 22 | ); |
| 21 | return JSON.parse(jsonPayload).sub; | 23 | return JSON.parse(jsonPayload).sub; |
| 22 | }; | 24 | } |
| 23 | 25 | ||
| 24 | export function get_user_mod_from_token(token: string | undefined): boolean | undefined { | 26 | export function get_user_mod_from_token( |
| 27 | token: string | undefined | ||
| 28 | ): boolean | undefined { | ||
| 25 | if (!token) { | 29 | if (!token) { |
| 26 | return undefined; | 30 | return undefined; |
| 27 | } | 31 | } |
| @@ -41,4 +45,4 @@ export function get_user_mod_from_token(token: string | undefined): boolean | un | |||
| 41 | .join('') | 45 | .join('') |
| 42 | ); | 46 | ); |
| 43 | return JSON.parse(jsonPayload).mod; | 47 | return JSON.parse(jsonPayload).mod; |
| 44 | }; | 48 | } |