mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
refactor(api): 🔥 Remove unused function
This commit is contained in:
parent
074d0e3dcc
commit
7638a094f4
|
|
@ -189,29 +189,6 @@ export const findManyUsers = async (
|
|||
return output.map((user) => transformOutputToUserWithRelations(user));
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves a user from a token.
|
||||
* @param access_token The access token to retrieve the user from.
|
||||
* @returns The user associated with the given access token.
|
||||
*/
|
||||
export const retrieveUserFromToken = async (
|
||||
accessToken: string,
|
||||
): Promise<User | null> => {
|
||||
if (!accessToken) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const token = await retrieveToken(accessToken);
|
||||
|
||||
if (!token?.userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const user = await User.fromId(token.userId);
|
||||
|
||||
return user;
|
||||
};
|
||||
|
||||
export const retrieveUserAndApplicationFromToken = async (
|
||||
accessToken: string,
|
||||
): Promise<{
|
||||
|
|
|
|||
Loading…
Reference in a new issue