Skip to content
Snippets Groups Projects
Verified Commit 3fb92531 authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Add data options.

parent 62493e9d
No related branches found
No related tags found
2 merge requests!60New component to search senior (see #12). Enhance responsiveness and solve #10 and #11,!58Camelize data and insert react-hook-form in autocomplete.
export type ResponseProps = {
id: number;
user: {
email: string;
firstName: string;
lastName: string;
username: string;
};
};
import axios from 'axios';
import { ResponseProps } from './ResponseProps';
export const getSeniorList = async (name: string): Promise<string[]> =>
axios.get(`/api/web/seniors/by_name/${name}`).then((res) => res.data);
export const getSeniorList = async (name: string): Promise<ResponseProps[]> =>
axios
.get(`/api/web/seniors/by_name/${name}?fields=user,id`)
.then((res) => res.data);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment