
const url = 'https://staging-qore-data-hair-353194.qore.dev'
const headers = {
    accept: '*/*',
    'x-qore-engine-admin-secret': 'cBfO0PFdM65CfHTknZT5oYxf3y9G4JCW',
}


class server {
    static async getUserData(client: any, userId: any) {
        const userData = await client.project.axios({
            method: 'post',
            headers,
            url: `${url}/v1/execute`,
            data: {
                operations: [
                    {
                        operation: 'Select',
                        instruction: {
                            table: 'users',
                            name: 'selectUser',
                            condition: {
                                id: userId,
                            },
                        },
                    },
                ],
            },
        })

        return userData.data.results.selectUser

    }
}

export default server