Skip to content

Commit

Permalink
refactor(notifications): Use number id instead of string device_ident…
Browse files Browse the repository at this point in the history
…ifier as unique device identifier
  • Loading branch information
Eisei24 committed Oct 22, 2024
1 parent 707cfcb commit 18aecaa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const props = defineProps<{
}>()
const emit = defineEmits<{
(e: 'remove-device', id: string): void,
(e: 'remove-device', id: number): void,
(e: 'toggle-notifications', {
id,
value,
}: {
id: string,
id: number,
value: boolean,
}): void,
}>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const handleToggleNotifications = ({
id,
value,
}: {
id: string,
id: number,
value: boolean,
}) => {
notificationsManagementStore.setNotificationForPairedDevice({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const useNotificationsManagementStore = defineStore('notifications-manage
)
}

const removeDevice = async (id: string) => {
const removeDevice = async (id: number) => {
await fetch(
API_PATH.NOTIFICATIONS_MANAGEMENT_PAIRED_DEVICES_DELETE,
{},
Expand All @@ -61,7 +61,7 @@ export const useNotificationsManagementStore = defineStore('notifications-manage
id,
value,
}: {
id: string,
id: number,
value: boolean,
}) => {
await fetch<InternalPutUserNotificationSettingsPairedDevicesResponse>(
Expand Down

0 comments on commit 18aecaa

Please sign in to comment.