refactor: moved BuildLog to models

This commit is contained in:
Jef Roosens 2022-05-19 08:20:11 +02:00
parent 6bd5b7cb48
commit 2fc25f1afe
Signed by untrusted user: Jef Roosens
GPG key ID: B580B976584B5F30
8 changed files with 37 additions and 32 deletions

View file

@ -4,7 +4,7 @@ import web
import net.http
import response { new_data_response, new_response }
import db
import models { GitRepoArch }
import models { GitRepo, GitRepoArch, GitRepoFilter }
// get_repos returns the current list of repos.
['/api/repos'; get]

View file

@ -8,6 +8,7 @@ import db
import time
import os
import util
import models { BuildLog }
// get_logs returns all build logs in the database. A 'repo' query param can
// optionally be added to limit the list of build logs to that repository.
@ -97,7 +98,7 @@ fn (mut app App) post_log() web.Result {
}
// Store log in db
log := db.BuildLog{
log := BuildLog{
repo_id: repo_id
start_time: start_time
end_time: end_time