Skip to content

Commit

Permalink
fromMapfromObject as per changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lgpawel committed Oct 9, 2023
1 parent 218feca commit 9b08a98
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zapisy/apps/notifications/assets/components/Widget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import relativeTime from "dayjs/plugin/relativeTime";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";
import "dayjs/locale/pl";
import { parse, ParseFn, fromMap, aString, anArrayContaining } from "spicery";
import { parse, ParseFn, fromObject, aString, anArrayContaining } from "spicery";
import Vue from "vue";
import Component from "vue-class-component";
Expand All @@ -24,10 +24,10 @@ class Notification {
// Defines a parser that validates and parses Notifications from JSON.
const notifications: ParseFn<Notification> = (x: any) =>
new Notification(
fromMap(x, "id", aString),
fromMap(x, "description", aString),
fromMap(x, "issued_on", aString),
fromMap(x, "target", aString)
fromObject(x, "id", aString),
fromObject(x, "description", aString),
fromObject(x, "issued_on", aString),
fromObject(x, "target", aString)
);
const notificationsArray = anArrayContaining(notifications);
Expand Down

0 comments on commit 9b08a98

Please sign in to comment.