endpoints/endpoints

View on GitHub
src/request-handler/lib/throw_if_model.js

Summary

Maintainability
A
0 mins
Test Coverage
import Kapow from 'kapow';

export default function(model) {
  if (model) {
    throw Kapow(409, 'Model with this ID already exists');
  }
  return model;
}