Files
node_learning_module_1/day11/resolvers/delete/deleteActivityLog.js
T
ryanwong a07577bffa day 11
2022-02-06 22:15:10 -05:00

23 lines
641 B
JavaScript
Executable File

"use strict";
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
/**
* activity_log 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.activity_log.realDelete(args.id);
} catch (error) {
console.log('delete_activity_log -> error', error);
return new ApolloError('InternalServerError');
}
}