add: applied join project

This commit is contained in:
2021-06-09 16:53:09 +08:00
parent d4b8b3e24f
commit 5489ea9fbc
32 changed files with 1497 additions and 132 deletions

View File

@@ -0,0 +1,13 @@
class AppliedProjectsController < ApplicationController
before_action :require_login
def create
@applied_project = Projects::ApplyJoinService.call(current_user, applied_params)
rescue Projects::ApplyJoinService::Error => ex
render_error(ex.message)
end
private
def applied_params
params.require(:applied_project).permit(:code, :role)
end
end