Files
node_task_1a/resolvers/delete/deleteActive.js
T
2022-04-12 08:57:07 -04:00

23 lines
623 B
JavaScript

"use strict";
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
/**
* active Resolve Delete
* @copyright 2021 Manaknightdigital Inc.
* @link https://manaknightdigital.com
* @license Proprietary Software licensing
* @author Ryan Wong
*
*/
const { ApolloError } = require('apollo-server-express');
module.exports = async (parent, args, {db}, info) => {
//Check Auth if user allowed
try {
return await db.active.realDelete(args.id);
} catch (error) {
console.log('delete_active -> error', error);
return new ApolloError('InternalServerError');
}
}