Skip to content

Commit

Permalink
fix: return Invalid ObjectID
Browse files Browse the repository at this point in the history
  • Loading branch information
7086cmd committed Mar 24, 2024
1 parent 7ebfd6a commit 03b3cfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/notification/modify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function modifyNotification(notification: NotificationInstance, id: string
}
}

async function modifyNotificationTitle(title: string, id: string) {
async function modifyNotificationTitle(id: string, title: string) {
const result = (
await axios(`/notification/${id}/title`, {
method: 'put',
Expand All @@ -38,7 +38,7 @@ async function modifyNotificationTitle(title: string, id: string) {
}
}

async function modifyNotificationContent(content: string, id: string) {
async function modifyNotificationContent(id: string, content: string) {
const result = (
await axios(`/notification/${id}/content`, {
method: 'put',
Expand Down
5 changes: 3 additions & 2 deletions src/components/notifications/ZNotificationCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async function deleteNotification(id: string) {
}}
</span>
<ElInput
v-model="notification.title"
v-model="title"
@keydown.enter="modifyTitle"
v-else
style="width: 60%; padding-bottom: 0.5rem; padding-top: 0.5rem"
Expand Down Expand Up @@ -121,7 +121,8 @@ async function deleteNotification(id: string) {
@keydown.enter="modifyContent"
type="textarea"
autosize
style="width: 85%; padding-top: 0.5rem; padding-bottom: 0.5rem"
class="w-full"
style="padding-top: 0.5rem; padding-bottom: 0.5rem"
>
</ElInput>
<div style="text-align: right">
Expand Down

0 comments on commit 03b3cfe

Please sign in to comment.