@vessl-ai/mcpctl-control-plane
Version:
Vessl MCP Control Plane service for managing distributed jobs.
37 lines (31 loc) • 1.04 kB
text/typescript
import { Body, Controller, Delete, Get, Param, Post } from '@nestjs/common';
import { SecretRefSource } from '@vessl-ai/mcpctl-shared/types/domain/secret';
import { SecretService } from './secret.service';
('secret')
export class SecretController {
constructor(private readonly secretService: SecretService) {}
()
async set(
() body: { sourceType: SecretRefSource; key: string; value: string },
) {
return this.secretService.set(body.sourceType, body.key, body.value);
}
(':sourceType')
async list(('sourceType') sourceType: SecretRefSource) {
return this.secretService.list(sourceType);
}
(':sourceType/:key')
async get(
('sourceType') sourceType: SecretRefSource,
('key') key: string,
) {
return this.secretService.get(sourceType, key);
}
(':sourceType/:key')
async delete(
('sourceType') sourceType: SecretRefSource,
('key') key: string,
) {
return this.secretService.delete(sourceType, key);
}
}