UNPKG

lux-framework

Version:

Build scalable, Node.js-powered REST APIs with almost no code.

14 lines (11 loc) 284 B
// @flow import { hasMediaType, NotAcceptableError } from '../../jsonapi'; /** * @private */ export default function validateAccept(contentType?: string): true { if (contentType && hasMediaType(contentType)) { throw new NotAcceptableError(contentType); } return true; }