Compare commits

..

No commits in common. "2a4f0654ea1fc242057dadcb5c23598e5e46cde4" and "3f442d7290025a9dce3166b79b226569bc679b80" have entirely different histories.

6 changed files with 3 additions and 22 deletions

View File

@ -10,7 +10,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
* Moved all API routes under `/v1` namespace
* Server port can now be configured
## [0.3.0](https://git.rustybever.be/vieter/vieter/src/tag/0.3.0)

View File

@ -1,5 +1,4 @@
// Bindings for the libarchive library
module package
#flag -larchive

View File

@ -12,7 +12,7 @@ pub fn (c &Client) get_targets(filter TargetFilter) ?[]Target {
return data.data
}
// get_all_targets retrieves *all* targets from the API using the default
// get_all_targets retrieves *all* targs from the API using the default
// limit.
pub fn (c &Client) get_all_targets() ?[]Target {
mut targets := []Target{}

View File

@ -1,17 +0,0 @@
module server
import io.util
import os
fn test_targets_api() ? {
// Create a database
// Start the server in a temporary directory
tmpdir := util.temp_dir()?
go server.server(
data_dir: tmpdir
pkg_dir: os.join_path_single(tmpdir, 'pkgs')
api_key: 't'
port: 9000
)
}

View File

@ -10,7 +10,6 @@ pub:
data_dir string
api_key string
default_arch string
port int = 8000
}
// cmd returns the cli submodule that handles starting the server

View File

@ -8,6 +8,7 @@ import util
import db
const (
port = 8000
log_file_name = 'vieter.log'
repo_dir_name = 'repos'
db_file_name = 'vieter.sqlite'
@ -76,5 +77,5 @@ pub fn server(conf Config) ? {
conf: conf
repo: repo
db: db
}, conf.port)
}, server.port)
}