Skip to content

Conversation

@johnpinto1
Copy link
Contributor

Issue fixed DCC bug for /api/v0/plans for creating a Plan given a
template id https://github.com/DigitalCurationCentre/DMPonline-Service/issues/711

Changes:

  • in app/controllers/api/v0/base_controller.rb: added strong
    parameters function plan_params.
  • in app/controllers/api/v0/plans_controller.rb: in method create()
    added
    @plan.org = @user.org
    and
    replaced
    @plan.assign_creator(plan_user)
    by
    @plan.add_user!(plan_user.id, :creator).

Issue fixed DCC bug for /api/v0/plans for creating a Plan given a
template id https://github.com/DigitalCurationCentre/DMPonline-Service/issues/711

Changes:
  - in app/controllers/api/v0/base_controller.rb: added strong
parameters function plan_params.
  - in app/controllers/api/v0/plans_controller.rb: in method create()
added
  @plan.org = @user.org
and
 replaced
    @plan.assign_creator(plan_user)
 by
    @plan.add_user!(plan_user.id, :creator).
@briri briri merged commit 3e2e2e7 into development Mar 31, 2022
@briri briri deleted the dcc_bug_711-Creating_plans_using_V0_Rest_API branch March 31, 2022 15:46
@briri briri mentioned this pull request Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants