Skip to content

Commit

Permalink
feat: add new services get user
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Oct 4, 2022
1 parent 8c4a999 commit b8e8144
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/services/get/user/id.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { api } from 'services/api';

export async function getUserAWS(id: string) {
const { data, status } = await api.get(`usuarios/${id}`);

return { data, status };
}
3 changes: 3 additions & 0 deletions src/services/get/user/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './situation';
export * from './type';
export * from './id';
11 changes: 11 additions & 0 deletions src/services/get/user/situation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { SituacaoUsuario } from 'types/Aws';

import { api } from 'services/api';

export async function situationUserAWS() {
const { data, status } = await api.get<SituacaoUsuario[]>(
`usuarios/situacoes`,
);

return { data, status };
}
9 changes: 9 additions & 0 deletions src/services/get/user/type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { TipoUsuario } from 'types/Aws';

import { api } from 'services/api';

export async function getUserTypeAWS() {
const { data, status } = await api.get<TipoUsuario[]>(`usuarios/tipos`);

return { data, status };
}

0 comments on commit b8e8144

Please sign in to comment.