- Added ProfileCard component to display user profile information. - Created DashboardLayout for consistent layout structure. - Defined Campaign and related types for campaign management. - Developed CampaignDetailPage for viewing individual campaign details. - Implemented CampaignsPage for listing and filtering campaigns. - Enhanced DashboardPage with user profile fetching and navigation. - Built RegisterPage for user profile registration and updates. - Added user service for fetching and updating user profiles. - Established campaigns service for managing campaign data and interactions. - Updated routing constants and router configuration for new pages.
19 lines
454 B
TypeScript
19 lines
454 B
TypeScript
import { API_ADDRESS } from "@/core/service/api-address";
|
|
import api from "@/core/service/axios";
|
|
|
|
export const sendOtpService = async (phoneNumber: string) => {
|
|
const res = await api.post(API_ADDRESS.auth.otp, phoneNumber);
|
|
return res.data;
|
|
};
|
|
|
|
export const verifyOtpService = async ({
|
|
mobile,
|
|
code,
|
|
}: {
|
|
mobile: string;
|
|
code: string;
|
|
}) => {
|
|
const res = await api.post(API_ADDRESS.auth.verifyOtp, { mobile, code });
|
|
return res.data;
|
|
};
|