Add legacy APIs so that I can migrate new app to techtracker.gibbyb.com and keep iOS app working

This commit is contained in:
2024-07-20 20:39:29 -05:00
parent 707ab6515c
commit f1947ccb62
7 changed files with 213 additions and 2 deletions

View File

@ -22,7 +22,7 @@ export default function Table({ employees }: { employees: Employee[] }) {
}, [employees]);
const fetchEmployees = useCallback(async (): Promise<Employee[]> => {
const res = await fetch('/api/get_employees', {
const res = await fetch('/api/v2/get_employees', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.API_KEY}`
@ -86,7 +86,7 @@ export default function Table({ employees }: { employees: Employee[] }) {
const handleSubmit = async () => {
if (selectedIds.length > 0 && status.trim() !== '') {
await fetch('/api/update_status', {
await fetch('/api/v2/update_status', {
method: 'POST',
headers: {
'Content-Type': 'application/json',