 module.exports = (model) ->
   create = (req, res, next) ->
+    req.body.systemId = req.systemId
     model.create req.body, (err, obj) ->
       if err
         res.json 500, {error: err.toString()}

      else
        options.query[k] = v

    model.find options
    , (err, result, pageCount) ->
      if err

        else
          res.json 200, obj
  update = (req, res, next) ->
    req.body.systemId = req.systemId
    if req.params.id

      # wierdly, mongoose doesn't work if you put an id
