feat: add media type selection to MediaFormModal and remove redundant type field from API requests in App component

This commit is contained in:
ethan.chen
2025-05-27 17:05:36 +08:00
parent f2fcabe79f
commit 5811739409
2 changed files with 39 additions and 16 deletions

View File

@@ -157,7 +157,6 @@
try {
const response = await request.post<ApiResponse<Media>>('/media/create', {
...media,
type: currentCategory
});
if (response.data.code === 0) {
@@ -176,7 +175,6 @@
try {
const response = await request.put<ApiResponse<Media>>(`/media/updateById/${media.id}`, {
...media,
type: currentCategory
});
if (response.data.code === 0) {