(apiBase: string, token: string)
| 38 | |
| 39 | export const tokenUser = new CachedFunction('token-user', { |
| 40 | async updater(apiBase: string, token: string): Promise<string> { |
| 41 | const response = await baseApiFetch({apiBase, token, path: 'user'}); |
| 42 | const details = await response.json(); |
| 43 | return details.login; |
| 44 | }, |
| 45 | maxAge: { |
| 46 | // The exact token is forever associated to the user |
| 47 | days: 365, |
nothing calls this directly
no test coverage detected