FIX update repositories api

This commit is contained in:
Jasder
2020-03-20 20:15:43 +08:00
parent 551bae911e
commit 3e2b417cce
12 changed files with 83 additions and 62 deletions

View File

@@ -1,7 +1,7 @@
class Contents::CreateForm < BaseForm
attr_accessor :login, :repo_identifier, :filepath, :branch, :new_branch
attr_accessor :filepath, :branch, :new_branch
validates :login, :repo_identifier, :filepath, presence: true
validates :filepath, presence: true
validate :check_branch

View File

@@ -1,6 +1,6 @@
class Contents::DeleteForm < BaseForm
attr_accessor :login, :repo_identifier, :filepath, :branch, :new_branch, :sha
attr_accessor :filepath, :branch, :new_branch, :sha
validates :login, :repo_identifier, :filepath, :sha, presence: true
validates :filepath, :sha, presence: true
end

View File

@@ -1,7 +1,7 @@
class Contents::UpdateForm < BaseForm
attr_accessor :login, :repo_identifier, :filepath, :branch, :new_branch, :sha
attr_accessor :filepath, :branch, :new_branch, :sha
validates :login, :repo_identifier, :filepath, :sha, presence: true
validates :filepath, :sha, presence: true
validate :check_branch