feat: introducing shortcode into admin module (#3504)
* feat: added query in infra to fetch all shortcodes * feat: added mutation in admin to delete shortcode * chore: added new tests for methods in shortcode module * chore: removed .vscode file * chore: added a new ShortcodeCreator type to output of fetchAllShortcodes query * chore: shortcodeCreator type is now nullable * chore: added type defs to fetchAllShortcodes method in admin module * docs: update code comments * chore: changed target to prod in hoppscotch-old-backend --------- Co-authored-by: Mir Arif Hasan <arif.ishan05@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
} from '@nestjs/graphql';
|
||||
import * as E from 'fp-ts/Either';
|
||||
import { UseGuards } from '@nestjs/common';
|
||||
import { Shortcode } from './shortcode.model';
|
||||
import { Shortcode, ShortcodeWithUserEmail } from './shortcode.model';
|
||||
import { ShortcodeService } from './shortcode.service';
|
||||
import { throwErr } from 'src/utils';
|
||||
import { GqlUser } from 'src/decorators/gql-user.decorator';
|
||||
@@ -19,6 +19,7 @@ import { AuthUser } from '../types/AuthUser';
|
||||
import { PaginationArgs } from 'src/types/input-types.args';
|
||||
import { GqlThrottlerGuard } from 'src/guards/gql-throttler.guard';
|
||||
import { SkipThrottle } from '@nestjs/throttler';
|
||||
import { GqlAdminGuard } from 'src/admin/guards/gql-admin.guard';
|
||||
|
||||
@UseGuards(GqlThrottlerGuard)
|
||||
@Resolver(() => Shortcode)
|
||||
@@ -121,7 +122,7 @@ export class ShortcodeResolver {
|
||||
@Args({
|
||||
name: 'code',
|
||||
type: () => ID,
|
||||
description: 'The shortcode to resolve',
|
||||
description: 'The shortcode to remove',
|
||||
})
|
||||
code: string,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user