Compare commits

..

1 Commits

Author SHA1 Message Date
Jef Roosens 8c5652c230
ci: made build upload failable; updated ci for use with PRs
ci/woodpecker/pr/docs Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/docker Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
2022-05-05 23:11:18 +02:00
2 changed files with 1 additions and 4 deletions

View File

@ -118,11 +118,9 @@ pub fn (db &VieterDb) delete_git_repo(repo_id int) {
// update_git_repo updates any non-array values for a given GitRepo.
pub fn (db &VieterDb) update_git_repo(repo_id int, params map[string]string) {
// sql db.conn {
// update GitRepo set repo
//}
mut values := []string{}
// TODO does this allow for SQL injection?
$for field in GitRepo.fields {
if field.name in params {
// Any fields that are array types require their own update method

View File

@ -60,7 +60,6 @@ fn (mut app App) delete_repo(id int) web.Result {
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
}
// repos.delete(id)
app.db.delete_git_repo(id)
return app.json(http.Status.ok, new_response('Repo removed successfully.'))