feat: Add get cron report

This commit is contained in:
Myzel394 2023-02-18 11:23:23 +01:00
parent 6f870f7302
commit 3b130d054f
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import {CronReport} from "~/server-types"
import {client} from "~/constants/axios-client"
export default async function getLatestCronReport(): Promise<CronReport> {
const {data} = await client.get(
`${import.meta.env.VITE_SERVER_BASE_URL}/v1/cron-report/latest/`,
{
withCredentials: true,
},
)
return data
}

View File

@ -56,3 +56,5 @@ export * from "./delete-alias"
export {default as deleteAlias} from "./delete-alias"
export * from "./delete-reserved-alias"
export {default as deleteReservedAlias} from "./delete-reserved-alias"
export * from "./get-latest-cron-report"
export {default as getLatestCronReport} from "./get-latest-cron-report"

View File

@ -213,3 +213,11 @@ export interface AdminSettings {
allowStatistics: boolean | null
allowAliasDeletion: boolean | null
}
export interface CronReport {
id: string
createdAt: Date
reportData: {
encryptedReport: string
}
}