mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-13 04:37:36 +01:00
disable caching for the /status api route
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
import {
|
||||||
|
disableCache,
|
||||||
|
} from '../../middlewares/cache';
|
||||||
|
|
||||||
const api = {};
|
const api = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,6 +19,8 @@ const api = {};
|
|||||||
api.getStatus = {
|
api.getStatus = {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '/status',
|
url: '/status',
|
||||||
|
// explicitly disable caching so that the server is always checked
|
||||||
|
middlewares: [disableCache],
|
||||||
async handler (req, res) {
|
async handler (req, res) {
|
||||||
res.respond(200, {
|
res.respond(200, {
|
||||||
status: 'up',
|
status: 'up',
|
||||||
|
|||||||
Reference in New Issue
Block a user