- 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
23 lines
795 B
TypeScript
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;
|
|
}
|
|
}
|