UNPKG

oralify-backend

Version:
22 lines (16 loc) 510 B
import { Request, Response } from "express"; import { supabase } from "../supabase"; export const saveDatafromLogin = async (req: Request, res: Response): Promise<void> => { const id = req.body.id; const {fullName, role, speciality, phone, mail} = req.body; const {error} = await supabase.from('users').update({ fullName, role, speciality, phone, mail }).eq('id', id); if (error) { res.status(500).json({error}); } }