feat(admin): implement authenticated Stage author restoration API
Deploy Canina / deploy (push) Failing after 2m1s

This commit is contained in:
Canina Automation committed 2026-10-28 14:55:19 +00:00
1 parent bee9c4d6e1
commit 6ed0e73311
9 files changed
+477

No files matched your search

+14
View File
@@ -30,6 +30,7 @@ import {
import { CreateUserDto, UpdateUserDto } from "./dto/user.dto";
import type { UserAdminActor } from "./user-role-policy";
import { SettingsService } from "../settings/settings.service";
import { StageAuthorRestorationService } from "./stage-author-restoration.service";
import { RolesGuard } from "../common/guards/roles.guard";
import { Roles } from "../common/decorators/roles.decorator";
@@ -43,6 +44,7 @@ export class AdminController {
constructor(
private readonly adminService: AdminService,
private readonly settingsService: SettingsService,
private readonly stageAuthorRestorationService?: StageAuthorRestorationService,
) {}
@Get("dashboard/stats")
@@ -73,6 +75,18 @@ export class AdminController {
};
}
@Post("users/stage-author-restoration")
@ApiOperation({
summary:
"بازیابی شناسه و مشخصات عمومی پنج نویسنده اورجینال مقالات در محیط استیج",
})
async restoreStageAuthors() {
if (!this.stageAuthorRestorationService) {
throw new Error("StageAuthorRestorationService not initialized");
}
return this.stageAuthorRestorationService.restoreStageAuthors();
}
@Get("users/:id")
@ApiOperation({ summary: "جزئیات کاربر" })
async getUserDetails(@Param("id") id: string) {