forked from trent_larson/crowd-funder-for-time-pwa
log service worker messages to the DB (now works)
This commit is contained in:
@@ -373,6 +373,7 @@ export default class App extends Vue {
|
||||
}
|
||||
|
||||
private askPermission(): Promise<NotificationPermission> {
|
||||
console.log("Requesting permission for notifications:", navigator);
|
||||
if (!("serviceWorker" in navigator && navigator.serviceWorker.controller)) {
|
||||
return Promise.reject("Service worker not available.");
|
||||
}
|
||||
|
||||
@@ -3,5 +3,8 @@ export interface Log {
|
||||
}
|
||||
|
||||
export const LogSchema = {
|
||||
logs: "message",
|
||||
// Currently keyed by "date" because A) today's log data is what we need so we append, and
|
||||
// B) we don't want it to grow so we remove everything if this is the first entry today.
|
||||
// See safari-notifications.js logMessage for the associated logic.
|
||||
logs: "date, message",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user