refactor: Simplify ChangePresentationInfosRequest by removing phone number and email fields; update related API endpoints for email and phone number management

This commit is contained in:
2025-04-24 04:43:41 -04:00
parent 06ac4c9624
commit 36846405a5
5 changed files with 146 additions and 24 deletions

View File

@@ -50,13 +50,10 @@ async function saveEmail() {
try {
isLoading.value = true;
// Save presentation info
// Save email
await client.post(
`/api/creators/${props.creator.id}/presentation-infos`,
`/api/creators/${props.creator.id}/email`,
{
description: props.creator.presentation?.description || "",
videoUrl: props.creator.presentation?.videoUrl || "",
phoneNumber: props.creator.presentation?.phoneNumber || "",
email: email.value || ""
}
);

View File

@@ -50,14 +50,11 @@ async function savePhoneNumber() {
try {
isLoading.value = true;
// Save presentation info
// Save phone number
await client.post(
`/api/creators/${props.creator.id}/presentation-infos`,
`/api/creators/${props.creator.id}/phone`,
{
description: props.creator.presentation?.description || "",
videoUrl: props.creator.presentation?.videoUrl || "",
phoneNumber: phoneNumber.value || "",
email: props.creator.presentation?.email || ""
phoneNumber: phoneNumber.value || ""
}
);