MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / handle_get_userinfo

Function handle_get_userinfo

packages/xadmin-auth/src/effects.js:4–11  ·  view source on GitHub ↗
({ type })

Source from the content-addressed store, hash-verified

2import { app, api } from 'xadmin'
3
4function *handle_get_userinfo({ type }) {
5 try{
6 const user = yield api({ resource_name: 'auth' }).get('user')
7 yield put({ type, payload: user, success: true })
8 } catch(err) {
9 app.error(err)
10 }
11}
12
13function *handle_user_signin({ payload: user }) {
14 if(user.name == undefined && user.username == undefined) {

Callers

nothing calls this directly

Calls 3

apiFunction · 0.90
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected