Skip to content

Commit

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

export async function getBarbeirosAWS() {
const { data, status } = await api(
`usuarios?sgTipoUsuario=GER&sgSituacaoUsuario=APR`,
);

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

export async function getBarbeirosToApproveAWS(page: number) {
const { data, status } = await api.get(
`usuarios?sgTipoUsuario=GER&sgSituacaoUsuario=EAN&page=${page}`,
);

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

export async function getBarbeirosApprovedAWS(page: number) {
const { data, status } = await api.get(
`usuarios?sgTipoUsuario=GER&sgSituacaoUsuario=APR&page=${page}`,
);

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

export async function getBarbeirosToApproveReprovadoAWS(page: number) {
const { data, status } = await api.get(
`usuarios?sgTipoUsuario=GER&sgSituacaoUsuario=RPR&page=${page}`,
);

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

export async function getBarbeiroAWS(email: string) {
const { data, status } = await api(
`usuarios?sgTipoUsuario=GER&nmEmail=${email}`,
);

return { data, status };
}
5 changes: 5 additions & 0 deletions src/services/get/barbeiro/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './analysisBarber';
export * from './approvedBarber';
export * from './disapprovedBarber';
export * from './allBarber';
export * from './id';

0 comments on commit e602637

Please sign in to comment.