(userId, options)
| 1 | import SequelizeRepository from '../database/repositories/sequelizeRepository' |
| 2 | |
| 3 | export default function getTenatUser(userId, options) { |
| 4 | let userIdOut |
| 5 | if (!userId) { |
| 6 | // Get current user |
| 7 | userIdOut = SequelizeRepository.getCurrentUser({ |
| 8 | ...options, |
| 9 | }).id |
| 10 | } else { |
| 11 | userIdOut = userId |
| 12 | } |
| 13 | |
| 14 | const tenantIdOut = SequelizeRepository.getCurrentTenant({ ...options }).id |
| 15 | return { |
| 16 | userIdOut, |
| 17 | tenantIdOut, |
| 18 | } |
| 19 | } |
no test coverage detected