Files
stack/apps/gateway/src/reload/reload.controller.ts
Jarvis 774b76447d
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
ci/woodpecker/push/ci Pipeline failed
fix: rename all packages from @mosaic/* to @mosaicstack/*
- Updated all package.json name fields and dependency references
- Updated all TypeScript/JavaScript imports
- Updated .woodpecker/publish.yml filters and registry paths
- Updated tools/install.sh scope default
- Updated .npmrc registry paths (worktree + host)
- Enhanced update-checker.ts with checkForAllUpdates() multi-package support
- Updated CLI update command to show table of all packages
- Added KNOWN_PACKAGES, formatAllPackagesTable, getInstallAllCommand
- Marked checkForUpdate() with @deprecated JSDoc

Closes #391
2026-04-04 21:43:23 -05:00

23 lines
795 B
TypeScript

import { Controller, HttpCode, HttpStatus, Inject, Post, UseGuards } from '@nestjs/common';
import type { SystemReloadPayload } from '@mosaicstack/types';
import { AdminGuard } from '../admin/admin.guard.js';
import { ChatGateway } from '../chat/chat.gateway.js';
import { ReloadService } from './reload.service.js';
@Controller('api/admin')
@UseGuards(AdminGuard)
export class ReloadController {
constructor(
@Inject(ReloadService) private readonly reloadService: ReloadService,
@Inject(ChatGateway) private readonly chatGateway: ChatGateway,
) {}
@Post('reload')
@HttpCode(HttpStatus.OK)
async triggerReload(): Promise<SystemReloadPayload> {
const result = await this.reloadService.reload('rest');
this.chatGateway.broadcastReload(result);
return result;
}
}