forked from vieter-v/vieter
chore: compile with -skip-unused
This commit is contained in:
parent
dc517c23c5
commit
3342eedfa4
7 changed files with 20 additions and 20 deletions
|
|
@ -11,7 +11,7 @@ import models { BuildLog, BuildLogFilter }
|
|||
|
||||
// v1_get_logs returns all build logs in the database. A 'target' query param can
|
||||
// optionally be added to limit the list of build logs to that repository.
|
||||
['/api/v1/logs'; auth; get]
|
||||
['/api/v1/logs'; auth; get; markused]
|
||||
fn (mut app App) v1_get_logs() web.Result {
|
||||
filter := models.from_params<BuildLogFilter>(app.query) or {
|
||||
return app.json(.bad_request, new_response('Invalid query parameters.'))
|
||||
|
|
@ -22,7 +22,7 @@ fn (mut app App) v1_get_logs() web.Result {
|
|||
}
|
||||
|
||||
// v1_get_single_log returns the build log with the given id.
|
||||
['/api/v1/logs/:id'; auth; get]
|
||||
['/api/v1/logs/:id'; auth; get; markused]
|
||||
fn (mut app App) v1_get_single_log(id int) web.Result {
|
||||
log := app.db.get_build_log(id) or { return app.status(.not_found) }
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ fn (mut app App) v1_get_single_log(id int) web.Result {
|
|||
}
|
||||
|
||||
// v1_get_log_content returns the actual build log file for the given id.
|
||||
['/api/v1/logs/:id/content'; auth; get]
|
||||
['/api/v1/logs/:id/content'; auth; get; markused]
|
||||
fn (mut app App) v1_get_log_content(id int) web.Result {
|
||||
log := app.db.get_build_log(id) or { return app.status(.not_found) }
|
||||
file_name := log.start_time.custom_format('YYYY-MM-DD_HH-mm-ss')
|
||||
|
|
@ -50,7 +50,7 @@ fn parse_query_time(query string) !time.Time {
|
|||
}
|
||||
|
||||
// v1_post_log adds a new log to the database.
|
||||
['/api/v1/logs'; auth; post]
|
||||
['/api/v1/logs'; auth; markused; post]
|
||||
fn (mut app App) v1_post_log() web.Result {
|
||||
// Parse query params
|
||||
start_time_int := app.query['startTime'].int()
|
||||
|
|
@ -121,7 +121,7 @@ fn (mut app App) v1_post_log() web.Result {
|
|||
}
|
||||
|
||||
// v1_delete_log allows removing a build log from the system.
|
||||
['/api/v1/logs/:id'; auth; delete]
|
||||
['/api/v1/logs/:id'; auth; delete; markused]
|
||||
fn (mut app App) v1_delete_log(id int) web.Result {
|
||||
log := app.db.get_build_log(id) or { return app.status(.not_found) }
|
||||
full_path := os.join_path(app.conf.data_dir, logs_dir_name, log.path())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue