forked from vieter-v/vieter
feat: adding target returns id of added entry
This commit is contained in:
parent
3e0a2584fa
commit
7b59277931
4 changed files with 11 additions and 7 deletions
|
|
@ -49,9 +49,9 @@ pub struct NewTarget {
|
|||
}
|
||||
|
||||
// add_target adds a new target to the server.
|
||||
pub fn (c &Client) add_target(t NewTarget) ?Response<string> {
|
||||
pub fn (c &Client) add_target(t NewTarget) ?Response<int> {
|
||||
params := models.params_from<NewTarget>(t)
|
||||
data := c.send_request<string>(Method.post, '/api/v1/targets', params)?
|
||||
data := c.send_request<int>(Method.post, '/api/v1/targets', params)?
|
||||
|
||||
return data
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue