Skip to content

Commit

Permalink
feat: add new service get barbeiro id
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Apr 11, 2022
1 parent a5bf195 commit ae8b3e3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/services/get/barbeiros.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ export async function getBarbeiros() {
p_limit: 10,
p_orderby: 'name',
p_ascordsc: 'asc',
p_admin_confirmed: true,
});

return { data, error, status };
}

export async function getBarbeiro(id: string) {
const { data, error, status } = await supabase.rpc('busca_filtrada_usuarios', {
p_id: id,
p_name: '',
p_ocupacao: '',
p_fullname: '',
p_email: '',
p_picture: '',
p_avatar_url: '',
p_page: 0,
p_limit: 10,
p_orderby: 'name',
p_ascordsc: 'asc',
p_admin_confirmed: false,
});

return { data, error, status };
Expand Down

0 comments on commit ae8b3e3

Please sign in to comment.