git add . && git commit -m

This commit is contained in:
2025-10-03 14:09:31 +08:00
parent 2be4afdcb1
commit a6389174d7
7 changed files with 323 additions and 67 deletions

View File

@@ -145,12 +145,9 @@ export async function apiInvestmentCreateInvoice({
data: any;
}) {
try {
const response = await apiConfig.post(
`/mobile/investment/${id}/invoice`,
{
data: data,
}
);
const response = await apiConfig.post(`/mobile/investment/${id}/invoice`, {
data: data,
});
return response.data;
} catch (error) {
throw error;
@@ -201,3 +198,46 @@ export async function apiInvestmentUpdateInvoice({
throw error;
}
}
export async function apiInvestmentCreateNews({
id,
data,
}: {
id: string;
data: any;
}) {
try {
const response = await apiConfig.post(`/mobile/investment/${id}/news`, {
data: data,
});
return response.data;
} catch (error) {
throw error;
}
}
export async function apiInvestmentGetNews({
id,
category,
}: {
id: string;
category: "all-news" | "one-news";
}) {
try {
const response = await apiConfig.get(
`/mobile/investment/${id}/news?category=${category}`
);
return response.data;
} catch (error) {
throw error;
}
}
export async function apiInvestmentDeleteNews({ id }: { id: string }) {
try {
const response = await apiConfig.delete(`/mobile/investment/${id}/news`);
return response.data;
} catch (error) {
throw error;
}
}