diff --git a/server/src/index.ts b/server/src/index.ts index 78ae639..37e74c6 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -165,4 +165,6 @@ const HOST = process.env.HOST || '0.0.0.0'; server.listen(PORT, () => { console.log(`Server listening on ${HOST}, port ${PORT}`); -}); \ No newline at end of file +}); + +console.log(process.env.API_KEY) \ No newline at end of file diff --git a/server/src/notifikace.ts b/server/src/notifikace.ts index 23a5f34..fe64f0e 100644 --- a/server/src/notifikace.ts +++ b/server/src/notifikace.ts @@ -4,7 +4,7 @@ import {NotififaceInput, NotifikaceData, UdalostEnum} from "./types"; const url = 'your_URL_here'; // Place your URL here -export const gotifyCall = async (data: NotififaceInput): Promise => { +export const gotifyCall = async (data: NotififaceInput): Promise => { const options = { headers: {"Content-Type": "application/json"}, @@ -21,7 +21,7 @@ export const gotifyCall = async (data: NotififaceInput): Promise success: true, message: "Notifikace doručena", }; - return response; + console.log(response) } catch (error: unknown) { if (axios.isAxiosError(error)) { const axiosError = error as AxiosError; @@ -30,17 +30,11 @@ export const gotifyCall = async (data: NotififaceInput): Promise success: false, message: "fail", }; - return axiosError.response; + console.log(axiosError.response); } } // Handle unknown error without a response - return { - status: 500, - statusText: 'Unknown error', - headers: {}, // empty headers - data: {success: false, message: "fail"}, - config: {}, // empty config - }; + console.log("unkown error") } };