imaginerio/narratives

View on GitHub
lists/Tag.js

Summary

Maintainability
A
0 mins
Test Coverage
const { Text } = require('@keystonejs/fields');

const defaultAuth = ({ authentication: { item } }) => item !== undefined;

module.exports = {
  access: {
    auth: true,
    create: defaultAuth,
    read: true,
    update: defaultAuth,
    delete: defaultAuth,
  },
  fields: {
    name: {
      type: Text,
      isRequired: true,
      isUnique: true,
    },
  },
  labelField: 'name',
};