diff --git a/messages/JsonMessages/ErrorApiData.ts b/messages/JsonMessages/ErrorApiData.ts index 0fbf3db7..bb029159 100644 --- a/messages/JsonMessages/ErrorApiData.ts +++ b/messages/JsonMessages/ErrorApiData.ts @@ -7,7 +7,7 @@ import { z } from "zod"; export const isErrorApiErrorData = z.object({ // @ts-ignore - type: z.literal('error'), + type: z.literal("error"), code: z.string(), title: z.string(), subtitle: z.string(), @@ -16,7 +16,7 @@ export const isErrorApiErrorData = z.object({ }); export const isErrorApiRetryData = z.object({ - type: z.literal('retry'), + type: z.literal("retry"), code: z.string(), title: z.string(), subtitle: z.string(), @@ -28,12 +28,12 @@ export const isErrorApiRetryData = z.object({ }); export const isErrorApiRedirectData = z.object({ - type: z.literal('redirect'), + type: z.literal("redirect"), urlToRedirect: z.string(), }); export const isErrorApiUnauthorizedData = z.object({ - type: z.literal('unauthorized'), + type: z.literal("unauthorized"), }); export const isErrorApiData = z.discriminatedUnion("type", [ diff --git a/pusher/src/Services/SocketManager.ts b/pusher/src/Services/SocketManager.ts index 5bbfe32c..9386824a 100644 --- a/pusher/src/Services/SocketManager.ts +++ b/pusher/src/Services/SocketManager.ts @@ -55,13 +55,7 @@ import { ExAdminSocketInterface } from "../Model/Websocket/ExAdminSocketInterfac import { compressors } from "hyper-express"; import { isMapDetailsData } from "../Messages/JsonMessages/MapDetailsData"; import { adminService } from "./AdminService"; -import { - ErrorApiData, - isErrorApiErrorData, - isErrorApiRedirectData, - isErrorApiRetryData, - isErrorApiUnauthorizedData, -} from "../Messages/JsonMessages/ErrorApiData"; +import { ErrorApiData } from "../Messages/JsonMessages/ErrorApiData"; import { BoolValue, Int32Value, StringValue } from "google-protobuf/google/protobuf/wrappers_pb"; const debug = Debug("socket");