You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
408 B
16 lines
408 B
class AddSchoolAppliesController < ApplicationController
|
|
before_action :require_login, :check_auth
|
|
|
|
def create
|
|
school = CreateAddSchoolApplyService.call(current_user, create_params)
|
|
render_ok(id: school.id)
|
|
rescue CreateAddSchoolApplyService::Error => ex
|
|
render_error(ex.message)
|
|
end
|
|
|
|
private
|
|
|
|
def create_params
|
|
params.permit(:name, :province, :city, :address, :remarks)
|
|
end
|
|
end |