concourse-client/src/util/Users.js
/**
 * Retrieves the currently logged-in user from the backend
 * 
 * @returns the currently logged-in user, or null if not logged in
 */
Retrieves the currently logged-in user from the backend

@returns the currently logged-in user, or null if not logged in
Retrieves the currently logged - in user from the backend @returns the currently logged - in user or null if not logged in
async function GetCurrentUser(){
	const user = await fetch(`${Backend()}/api/v1/users/current`, {
		credentials: 'same-origin'
	})
	if(user.status === 200){
		return user.json()
	}else{
		return null
	}
}
async function GetCurrentUser ( ) { const user = await fetch ( ` ${ Backend ( ) } ` , { credentials : 'same-origin' } ) if ( user . status === 200 ) { return user . json ( ) } else { return null } }
Retrieves the currently logged-in user from the backend
Retrieves the currently logged - in user from the backend