mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-27 06:59:54 +08:00
Feat: Get the details of an instance add permission
This commit is contained in:
parent
a177da765a
commit
245462e057
@ -8,6 +8,8 @@ import { timeUuid } from "../../service/password";
|
||||
import { $t } from "../../i18n";
|
||||
import axios from "axios";
|
||||
import { systemConfig } from "../../setting";
|
||||
import { getUserUuid } from "../../service/passport_service";
|
||||
import { isHaveInstanceByUuid } from "../../service/permission_service";
|
||||
|
||||
const router = new Router({ prefix: "/instance" });
|
||||
|
||||
@ -21,6 +23,7 @@ router.get(
|
||||
try {
|
||||
const serviceUuid = String(ctx.query.remote_uuid);
|
||||
const instanceUuid = String(ctx.query.uuid);
|
||||
if (!isHaveInstanceByUuid(getUserUuid(ctx), serviceUuid, instanceUuid)) return;
|
||||
const remoteService = RemoteServiceSubsystem.getInstance(serviceUuid);
|
||||
const result = await new RemoteRequest(remoteService).request("instance/detail", {
|
||||
instanceUuid
|
||||
|
Loading…
Reference in New Issue
Block a user