Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const isWebCreatorOrAdmin = (web: NexusGenAllTypes['Web']) => {
const viewer = isAuthenticated();
// TODO: if (viewer.isAdmin) return;
if (viewer.id === web.creator.id) return;
throw new ForbiddenError('you must be web creator or admin');
};