chore: removed unused dependencies
This commit is contained in:
@@ -318,18 +318,6 @@ export const TEAM_INVITATION_NOT_FOUND =
|
|||||||
*/
|
*/
|
||||||
export const SHORTCODE_NOT_FOUND = 'shortcode/not_found' as const;
|
export const SHORTCODE_NOT_FOUND = 'shortcode/not_found' as const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Invalid ShortCode format
|
|
||||||
* (ShortcodeService)
|
|
||||||
*/
|
|
||||||
export const SHORTCODE_INVALID_JSON = 'shortcode/invalid_json' as const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ShortCode already exists in DB
|
|
||||||
* (ShortcodeService)
|
|
||||||
*/
|
|
||||||
export const SHORTCODE_ALREADY_EXISTS = 'shortcode/already_exists' as const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalid or non-existent TEAM ENVIRONMENT ID
|
* Invalid or non-existent TEAM ENVIRONMENT ID
|
||||||
* (TeamEnvironmentsService)
|
* (TeamEnvironmentsService)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
Args,
|
Args,
|
||||||
Context,
|
|
||||||
ID,
|
ID,
|
||||||
Mutation,
|
Mutation,
|
||||||
Query,
|
Query,
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { mockDeep, mockReset } from 'jest-mock-extended';
|
import { mockDeep, mockReset } from 'jest-mock-extended';
|
||||||
import { PrismaService } from '../prisma/prisma.service';
|
import { PrismaService } from '../prisma/prisma.service';
|
||||||
import {
|
import {
|
||||||
SHORTCODE_ALREADY_EXISTS,
|
|
||||||
SHORTCODE_INVALID_JSON,
|
|
||||||
SHORTCODE_INVALID_PROPERTIES_JSON,
|
SHORTCODE_INVALID_PROPERTIES_JSON,
|
||||||
SHORTCODE_INVALID_REQUEST_JSON,
|
SHORTCODE_INVALID_REQUEST_JSON,
|
||||||
SHORTCODE_NOT_FOUND,
|
SHORTCODE_NOT_FOUND,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Injectable, OnModuleInit } from '@nestjs/common';
|
import { Injectable, OnModuleInit } from '@nestjs/common';
|
||||||
import * as T from 'fp-ts/Task';
|
import * as T from 'fp-ts/Task';
|
||||||
import * as O from 'fp-ts/Option';
|
|
||||||
import * as TO from 'fp-ts/TaskOption';
|
import * as TO from 'fp-ts/TaskOption';
|
||||||
import * as E from 'fp-ts/Either';
|
import * as E from 'fp-ts/Either';
|
||||||
import { PrismaService } from 'src/prisma/prisma.service';
|
import { PrismaService } from 'src/prisma/prisma.service';
|
||||||
@@ -123,7 +122,8 @@ export class ShortcodeService implements UserDataHandler, OnModuleInit {
|
|||||||
userInfo: AuthUser,
|
userInfo: AuthUser,
|
||||||
) {
|
) {
|
||||||
const requestData = stringToJson(request);
|
const requestData = stringToJson(request);
|
||||||
if (E.isLeft(requestData)) return E.left(SHORTCODE_INVALID_REQUEST_JSON);
|
if (E.isLeft(requestData) || !requestData.right)
|
||||||
|
return E.left(SHORTCODE_INVALID_REQUEST_JSON);
|
||||||
|
|
||||||
const parsedProperties = stringToJson(properties);
|
const parsedProperties = stringToJson(properties);
|
||||||
if (E.isLeft(parsedProperties))
|
if (E.isLeft(parsedProperties))
|
||||||
|
|||||||
Reference in New Issue
Block a user