debian-mirror-gitlab/app/services/boards/update_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
444 B
Ruby
Raw Normal View History

2019-09-30 21:07:59 +05:30
# frozen_string_literal: true
module Boards
class UpdateService < Boards::BaseService
2021-04-17 20:07:23 +05:30
PERMITTED_PARAMS = %i(name hide_backlog_list hide_closed_list).freeze
2019-09-30 21:07:59 +05:30
def execute(board)
2021-04-17 20:07:23 +05:30
filter_params
2019-09-30 21:07:59 +05:30
board.update(params)
end
2021-04-17 20:07:23 +05:30
def filter_params
params.slice!(*permitted_params)
end
def permitted_params
PERMITTED_PARAMS
end
2019-09-30 21:07:59 +05:30
end
end
2019-12-04 20:38:33 +05:30
2021-06-08 01:23:25 +05:30
Boards::UpdateService.prepend_mod_with('Boards::UpdateService')