-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from aXenDeveloper/forum/edit
feat: Add edit dialog for forum in AdminCP
- Loading branch information
Showing
45 changed files
with
1,286 additions
and
818 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ArgsType, Field, Int } from "@nestjs/graphql"; | ||
|
||
import { CreateForumForumsArgs } from "../../create/dto/create.args"; | ||
|
||
@ArgsType() | ||
export class EditForumForumsArgs extends CreateForumForumsArgs { | ||
@Field(() => Int) | ||
id: number; | ||
} |
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,21 @@ | ||
import { Args, Mutation, Resolver } from "@nestjs/graphql"; | ||
import { UseGuards } from "@nestjs/common"; | ||
|
||
import { EditForumForumsService } from "./edit.service"; | ||
import { CreateForumForumsObj } from "../create/dto/create.obj"; | ||
import { EditForumForumsArgs } from "./dto/edit.args"; | ||
|
||
import { AdminAuthGuards } from "@/utils/guards/admin-auth.guards"; | ||
|
||
@Resolver() | ||
export class EditForumForumsResolver { | ||
constructor(private readonly service: EditForumForumsService) {} | ||
|
||
@Mutation(() => CreateForumForumsObj) | ||
@UseGuards(AdminAuthGuards) | ||
async admin__forum_forums__edit( | ||
@Args() args: EditForumForumsArgs | ||
): Promise<CreateForumForumsObj> { | ||
return await this.service.edit(args); | ||
} | ||
} |
Oops, something went wrong.