Removes the user param from the client and forces it to be current_user in the controller

This commit is contained in:
kikito
2015-12-16 18:06:25 +01:00
parent e6755fa804
commit 22ec287b16
2 changed files with 1 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ class AnnotationsController < ApplicationController
def create
@annotation = Annotation.new(annotation_params)
@annotation.user = current_user
if @annotation.save
render json: @annotation.to_json
end