Default meilisearch data response + linting + prettyfier
This commit is contained in:
parent
5dd106e956
commit
a9889721ec
|
@ -85,6 +85,10 @@ async function meilisearchStatus() {
|
||||||
if (meilisearch) {
|
if (meilisearch) {
|
||||||
return meilisearch.serverStats();
|
return meilisearch.serverStats();
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {
|
||||||
|
health: "unconfigured",
|
||||||
|
size: 0,
|
||||||
|
indexed_count: 0,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import type Bull from "bull";
|
import type Bull from "bull";
|
||||||
|
|
||||||
import { queueLogger } from "../../logger.js";
|
import {queueLogger} from "../../logger.js";
|
||||||
import { Notes } from "@/models/index.js";
|
import {Notes} from "@/models/index.js";
|
||||||
import { MoreThan } from "typeorm";
|
import {MoreThan} from "typeorm";
|
||||||
import {index} from "@/services/note/create.js";
|
import {index} from "@/services/note/create.js";
|
||||||
import {Note} from "@/models/entities/note.js";
|
import {Note} from "@/models/entities/note.js";
|
||||||
import meilisearch from "../../../db/meilisearch.js";
|
import meilisearch from "../../../db/meilisearch.js";
|
||||||
|
|
|
@ -34,7 +34,6 @@ export default define(meta, paramDef, async () => {
|
||||||
total: fsStats[0].size,
|
total: fsStats[0].size,
|
||||||
used: fsStats[0].used,
|
used: fsStats[0].used,
|
||||||
},
|
},
|
||||||
meilisearch: meilisearchStats,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -42,6 +41,10 @@ async function meilisearchStatus() {
|
||||||
if (meilisearch) {
|
if (meilisearch) {
|
||||||
return meilisearch.serverStats();
|
return meilisearch.serverStats();
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {
|
||||||
|
health: "unconfigured",
|
||||||
|
size: 0,
|
||||||
|
indexed_count: 0,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue