-
-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64924e4
commit 5d479e2
Showing
34 changed files
with
603 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
apps/nestjs-backend/src/features/integrity/integrity.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Controller, Get, Param, Post, UseGuards } from '@nestjs/common'; | ||
import type { IIntegrityCheckVo } from '@teable/openapi'; | ||
import { Permissions } from '../auth/decorators/permissions.decorator'; | ||
import { PermissionGuard } from '../auth/guard/permission.guard'; | ||
import { LinkIntegrityService } from './link-integrity.service'; | ||
|
||
@UseGuards(PermissionGuard) | ||
@Controller('api/integrity') | ||
export class IntegrityController { | ||
constructor(private readonly linkIntegrityService: LinkIntegrityService) {} | ||
|
||
@Permissions('table|create') | ||
@Get('base/:baseId/link-check') | ||
async checkBaseIntegrity(@Param('baseId') baseId: string): Promise<IIntegrityCheckVo> { | ||
return await this.linkIntegrityService.linkIntegrityCheck(baseId); | ||
} | ||
|
||
@Permissions('table|create') | ||
@Post('base/:baseId/link-fix') | ||
async fixBaseIntegrity(@Param('baseId') baseId: string): Promise<void> { | ||
return await this.linkIntegrityService.linkIntegrityFix(baseId); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
apps/nestjs-backend/src/features/integrity/integrity.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { IntegrityController } from './integrity.controller'; | ||
import { LinkIntegrityService } from './link-integrity.service'; | ||
|
||
@Module({ | ||
controllers: [IntegrityController], | ||
providers: [LinkIntegrityService], | ||
exports: [LinkIntegrityService], | ||
}) | ||
export class IntegrityModule {} |
Oops, something went wrong.