class ContentsController < ApplicationController before_action :find_user, :find_repository before_action :require_login, only: %i[create] def create # request_params = {user: @user, repo_name: @repo.identifier, filepath: params[:filepath]} logger.info "current_user ----> #{current_user.login}" @user = current_user interactor = Gitea::CreateFileInteractor.call(@user, content_params) if interactor.success? @file = interactor.result logger.info "@file ========> #{@file}" else render_error(interactor.error) end end def update_file end def delete_file end private def content_params params.permit(:login, :repo_identifier, :filepath, :branch, :content, :message, :new_branch) end end