Receipt create. Part 1

This commit is contained in:
alexey
2025-02-22 00:11:05 +03:00
parent 0e894fafd6
commit 6527af5005
92 changed files with 2629 additions and 0 deletions

View File

@@ -37,4 +37,13 @@ class DBase
{ :fname => item[:filepath], :descr => item[:descr], :id => item[:id] }
end
end
def delete_repo_by_name(repo_name)
rep_id = Repos.where(reponame: repo_name).first
unless rep_id[:id].nil?
id = rep_id[:id]
RepocRecips.where(repo_id: id).delete
Repos.where(id: id).delete
end
end
end

View File

@@ -145,6 +145,7 @@ class GitRepo
f.flock(File::LOCK_EX)
if File.exist?(git_path)
FileUtils.rm_rf(git_path, secure: true)
@db.delete_repo_by_name(reponame)
end
end
end