Added projects. Part 4

This commit is contained in:
alexey
2025-02-26 23:55:39 +03:00
parent 8d10b21963
commit 34a69e1a1d
103 changed files with 150 additions and 10 deletions

View File

@@ -119,6 +119,10 @@ class DBase
Projects.order(:id).all
end
def proj(id)
Projects[id]
end
def proj_create(proj_name, proj_descr)
@error = nil
data = Projects.where(projname: proj_name).first
@@ -130,4 +134,17 @@ class DBase
end
@error
end
def get_gits_for_projects(id)
result = []
git_list = ReposProjects.where(proj_id: id.to_i).all
unless git_list.nil?
result = git_list.map do |item|
Repos[item[:repo_id]]
end.reject do |item|
item.nil?
end
end
result
end
end