Receipt create. Part 1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user