Some updates after a quick test run

This commit is contained in:
Matthew Raymer
2023-12-01 05:02:17 -05:00
parent 1ee6203f4c
commit 3b32c2b156
4 changed files with 46 additions and 51 deletions

View File

@@ -266,19 +266,19 @@ interface ServiceWorkerMessage {
type: string;
data: string;
}
interface ServiceWorkerResponse {
// Define the properties and their types
success: boolean;
message?: string;
}
// Example interface for error
interface ErrorResponse {
message: string;
// Other properties as needed
}
interface VapidResponse {
data: {
vapidKey: string;
@@ -302,7 +302,7 @@ export default class App extends Vue {
console.error("API error", error);
});
}
private sendMessageToServiceWorker(
message: ServiceWorkerMessage,
): Promise<unknown> {
@@ -342,7 +342,7 @@ export default class App extends Vue {
.then(() => this.requestNotificationPermission())
.catch((error) => Promise.reject(error));
}
private sendSecretToServiceWorker(secret: string): Promise<void> {
const message: ServiceWorkerMessage = {
type: "SEND_LOCAL_DATA",