-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add project frontend API with tests and fix backend project API (…
…#25) #5 This commit adds the project frontend API along with its corresponding tests. It also fixes an issue in the backend project API where the user ID should be a number. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a new `getHello` GraphQL query for a simple greeting response. - Added role and menu management functionalities in the `AuthService`. - Implemented `MenuGuard` and `RolesGuard` for enhanced access control. - Created an `InitRolesService` for initializing default roles on application startup. - **Bug Fixes** - Improved formatting in the `README.md` for better readability. - **Documentation** - Updated GraphQL schema to reflect new query and field requirements. - **Chores** - Removed unused imports in the `UserService`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
08ceb20
commit 450bdc7
Showing
17 changed files
with
566 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ Still on progress | |
|
||
CodeFox | ||
LOGO | ||
![](./assets/WechatIMG1000.svg) | ||
![](./assets/WechatIMG1000.svg) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { Query, Resolver } from '@nestjs/graphql'; | ||
import { RequireRoles } from './decorator/auth.decorator'; | ||
|
||
@Resolver() | ||
export class AppResolver { | ||
@Query(() => String) | ||
@RequireRoles('Admin') | ||
getHello(): string { | ||
return 'Hello World!'; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.