upd: token device

Deskripsi
This commit is contained in:
amel
2025-06-24 17:40:29 +08:00
parent c6635fb88e
commit 720a8ce5fb
4 changed files with 73 additions and 23 deletions

View File

@@ -2,7 +2,8 @@ import axios from 'axios';
const api = axios.create({
// baseURL: 'http://10.0.2.2:3000/api',
baseURL: 'https://stg-darmasaba.wibudev.com/api',
// baseURL: 'https://stg-darmasaba.wibudev.com/api',
baseURL: 'http://192.168.1.243:3000/api',
});
export const apiCheckPhoneLogin = async (body: { phone: string }) => {
@@ -632,4 +633,14 @@ export const apiCopyDocument = async (data: { path: string, dataItem: any[], use
export const apiShareDocument = async (data: { dataDivision: any[], dataItem: any[], user: string }) => {
const response = await api.delete(`/mobile/document/more`, { data })
return response.data;
};
export const apiRegisteredToken = async (data: { user: string, token: string }) => {
const response = await api.post(`/mobile/auth-token/`, data)
return response.data;
};
export const apiUnregisteredToken = async (data: { user: string, token: string }) => {
const response = await api.put(`/mobile/auth-token/`, data)
return response.data;
};