refactor(core): Rename RequireGlobalScope to GlobalScope (no-changelog) (#8760)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-02-28 14:40:02 +01:00
committed by GitHub
parent 246bfb9ad4
commit 2811f77798
15 changed files with 70 additions and 77 deletions

View File

@@ -13,7 +13,7 @@ import {
Patch,
Post,
RestController,
RequireGlobalScope,
GlobalScope,
} from '@/decorators';
import { NodeRequest } from '@/requests';
import type { InstalledPackages } from '@db/entities/InstalledPackages';
@@ -62,7 +62,7 @@ export class CommunityPackagesController {
}
@Post('/')
@RequireGlobalScope('communityPackage:install')
@GlobalScope('communityPackage:install')
async installPackage(req: NodeRequest.Post) {
const { name } = req.body;
@@ -159,7 +159,7 @@ export class CommunityPackagesController {
}
@Get('/')
@RequireGlobalScope('communityPackage:list')
@GlobalScope('communityPackage:list')
async getInstalledPackages() {
const installedPackages = await this.communityPackagesService.getAllInstalledPackages();
@@ -194,7 +194,7 @@ export class CommunityPackagesController {
}
@Delete('/')
@RequireGlobalScope('communityPackage:uninstall')
@GlobalScope('communityPackage:uninstall')
async uninstallPackage(req: NodeRequest.Delete) {
const { name } = req.query;
@@ -246,7 +246,7 @@ export class CommunityPackagesController {
}
@Patch('/')
@RequireGlobalScope('communityPackage:update')
@GlobalScope('communityPackage:update')
async updatePackage(req: NodeRequest.Update) {
const { name } = req.body;