forked from vieter-v/vieter
refactor: moved response module to web.response
This commit is contained in:
parent
cc5df95a1a
commit
e23635a1d3
9 changed files with 9 additions and 16 deletions
|
|
@ -2,7 +2,7 @@ module client
|
|||
|
||||
import net.http { Method }
|
||||
import net.urllib
|
||||
import response { Response }
|
||||
import web.response { Response }
|
||||
import json
|
||||
|
||||
pub struct Client {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module client
|
|||
|
||||
import models { BuildLog, BuildLogFilter }
|
||||
import net.http { Method }
|
||||
import response { Response }
|
||||
import web.response { Response }
|
||||
import time
|
||||
|
||||
// get_build_logs returns all build logs.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module client
|
|||
|
||||
import models { Target, TargetFilter }
|
||||
import net.http { Method }
|
||||
import response { Response }
|
||||
import web.response { Response }
|
||||
|
||||
// get_targets returns a list of targets, given a filter object.
|
||||
pub fn (c &Client) get_targets(filter TargetFilter) ?[]Target {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ module server
|
|||
import web
|
||||
import net.http
|
||||
import net.urllib
|
||||
import response { new_data_response, new_response }
|
||||
import web.response { new_data_response, new_response }
|
||||
import db
|
||||
import time
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module server
|
|||
|
||||
import web
|
||||
import net.http
|
||||
import response { new_data_response, new_response }
|
||||
import web.response { new_data_response, new_response }
|
||||
import db
|
||||
import models { Target, TargetArch, TargetFilter }
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import time
|
|||
import rand
|
||||
import util
|
||||
import net.http
|
||||
import response { new_response }
|
||||
import web.response { new_response }
|
||||
|
||||
// healthcheck just returns a string, but can be used to quickly check if the
|
||||
// server is still responsive.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module server
|
|||
|
||||
import web
|
||||
import net.http
|
||||
import response { new_response }
|
||||
import web.response { new_response }
|
||||
|
||||
// delete_package tries to remove the given package.
|
||||
['/:repo/:arch/:pkg'; delete]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue