Skip to content
Snippets Groups Projects
Commit 83168955 authored by xcf-t's avatar xcf-t
Browse files

Fix subscription auth, Fix updateTokenCode collision

parent 02ea620b
No related branches found
No related tags found
No related merge requests found
{
"name": "lissy-v2",
"version": "1.0.0",
"name": "lissy-api",
"version": "2.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "lissy-v2",
"version": "1.0.0",
"name": "lissy-api",
"version": "2.0.0",
"dependencies": {
"@nestjs/apollo": "^10.1.3",
"@nestjs/common": "^9.1.2",
......
......@@ -36,7 +36,7 @@ import { Context } from 'graphql-ws';
return {
req: {
headers: {
authorization: { token },
authorization: token,
},
},
};
......
......@@ -2,9 +2,7 @@ import {
Args,
Context,
Mutation,
Parent,
Query,
ResolveField,
Resolver,
Subscription,
} from '@nestjs/graphql';
......@@ -16,7 +14,7 @@ import { AuthGuard } from '../auth/auth.guard';
import { AgentGuard } from '../auth/agent.guard';
import { GroupGuard } from '../auth/group.guard';
import { TokenCode } from '@prisma/client';
import { AgentFlags, AgentModel } from './models/agent.model';
import { AgentFlags } from './models/agent.model';
import { PubSub } from 'graphql-subscriptions';
import { TokenCodeInputModel } from './models/token-code-input.model';
......@@ -164,7 +162,7 @@ export class TokenCodeResolver {
});
}
@Mutation(() => TokenCodeModel)
/*@Mutation(() => TokenCodeModel)
@UseGuards(AuthGuard, AgentGuard)
async updateTokenCode(
@Args('id') id: string,
......@@ -199,7 +197,7 @@ export class TokenCodeResolver {
await this.pubSub.publish('onTokenCodeUpdate', tokenCode);
return tokenCode;
}
}*/
/*@ResolveField('agent')
async agent(@Parent() parent: TokenCodeModel): Promise<AgentModel> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment