[FEATURE] Integrated Minecluster with Cairo & Established Gitea workflows (#12)

Co-authored-by: Dunemask <dunemask@gmail.com>
Reviewed-on: https://gitea.dunemask.dev/elysium/minecluster/pulls/12
This commit is contained in:
dunemask 2024-02-05 02:13:32 +00:00
parent edbfc2348a
commit 78c5b72482
30 changed files with 391 additions and 53 deletions

View file

@ -1,9 +1,9 @@
import { getDeployments } from "../k8s/k8s-server-control.js";
import { getUserDeployments } from "../k8s/k8s-server-control.js";
import { getInstances } from "../k8s/server-status.js";
import { sendError } from "../util/ExpressClientError.js";
export function serverList(req, res) {
getDeployments()
getUserDeployments(req.cairoId)
.then((sd) => res.json(sd.map((s) => s.metadata.name.substring(4))))
.catch((e) => {
ERR("STATUS CONTROLLER", e);
@ -12,7 +12,7 @@ export function serverList(req, res) {
}
export function serverInstances(req, res) {
getInstances()
getInstances(req.cairoId)
.then((i) => res.json(i))
.catch(sendError(res));
}