11 lines
284 B
TypeScript
11 lines
284 B
TypeScript
import { wrapAction } from '../../action-wrapper'
|
|
|
|
export const getCurrentUser = wrapAction(
|
|
{ actionName: 'getCurrentUser', errorMessage: 'Failed to get current Odoo user' },
|
|
async ({ odooClient }) => {
|
|
const id = await odooClient.getCurrentUserId()
|
|
|
|
return { id }
|
|
}
|
|
)
|