feat: parametro para rota de usuarios_quipo
This commit is contained in:
parent
2b7b780ad5
commit
1d2ac18171
1 changed files with 5 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ import { respostaComuns, type tipoResposta } from "p-respostas"
|
|||
import type { z } from "zod"
|
||||
import type { zAmbiente } from "../ts/ambiente"
|
||||
import { urlAutenticacao } from "./_urlAutenticacao"
|
||||
import { tipos_de_acesso_quipo } from "../tokenQuipo"
|
||||
|
||||
export type tipoUsuarioExterno = {
|
||||
nome: string
|
||||
|
|
@ -14,14 +15,16 @@ export type tipoUsuarioExterno = {
|
|||
codigo: string
|
||||
}
|
||||
|
||||
export const usuarios_quipo_governo = async ({
|
||||
export const usuarios_quipo = async ({
|
||||
token_produto,
|
||||
ambiente,
|
||||
tipo,
|
||||
}: {
|
||||
ambiente: z.infer<typeof zAmbiente>
|
||||
token_produto: string
|
||||
tipo: tipos_de_acesso_quipo,
|
||||
}): Promise<tipoResposta<tipoUsuarioExterno[]>> => {
|
||||
const url = `${urlAutenticacao(ambiente)}/api/usuarios_quipo_governo`
|
||||
const url = `${urlAutenticacao(ambiente)}/api/usuarios_quipo/${tipo}`
|
||||
|
||||
if (!token_produto) return respostaComuns.erro("token_produto não informado")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue