Skip to content

Commit

Permalink
Update oauth_applications.cr
Browse files Browse the repository at this point in the history
Switch from assign_attributes to assign_attributes_from_json
  • Loading branch information
grkek authored Oct 10, 2023
1 parent 6ea4627 commit 44346e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/placeos-rest-api/controllers/oauth_applications.cr
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module PlaceOS::Api
@[AC::Route::PUT("/:id", body: :app)]
def update(app : Model::DoorkeeperApplication) : Model::DoorkeeperApplication
current = current_app
current.assign_attributes(app)
current.assign_attributes_from_json(app.to_json)
raise Error::ModelValidation.new(current.errors) unless current.save
current
end
Expand Down

0 comments on commit 44346e9

Please sign in to comment.