logs.ts 428 B

123456789101112131415161718
  1. import { makeGetRequest } from '../requests/requests'
  2. import { LogLevel } from '../../models/server/log-level.type'
  3. function getLogs (url: string, accessToken: string, startDate: Date, endDate?: Date, level?: LogLevel) {
  4. const path = '/api/v1/server/logs'
  5. return makeGetRequest({
  6. url,
  7. path,
  8. token: accessToken,
  9. query: { startDate, endDate, level },
  10. statusCodeExpected: 200
  11. })
  12. }
  13. export {
  14. getLogs
  15. }