mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 21:27:57 +00:00
Don't release keyring entries just because a user requested them (Fixes #137)
This commit is contained in:
parent
c2103e3b86
commit
d02bf3b7b9
@ -248,9 +248,7 @@ static int restful_keyring_get(httpd_request *r, const char *remainder)
|
||||
keyring_identity *id = keyring_find_identity_sid(keyring, &r->sid1);
|
||||
if (!id)
|
||||
return http_request_keyring_response(r, 404, "Identity not found");
|
||||
int ret = http_request_keyring_response_identity(r, 200, id);
|
||||
keyring_free_identity(id);
|
||||
return ret;
|
||||
return http_request_keyring_response_identity(r, 200, id);
|
||||
}
|
||||
|
||||
static int restful_keyring_remove(httpd_request *r, const char *remainder)
|
||||
|
@ -98,6 +98,8 @@ doc_keyringGet="REST API get single keyring identity as JSON"
|
||||
test_keyringGet() {
|
||||
rest_request GET "/restful/keyring/$SIDA1"
|
||||
assertJq response.json 'contains({"identity": {"sid": "'$SIDA1'", "identity": "'$IDA1'", "did": "'"$DIDA1"'", "name": "'"$NAMEA1"'"}})'
|
||||
rest_request GET "/restful/keyring/$SIDA1"
|
||||
assertJq response.json 'contains({"identity": {"sid": "'$SIDA1'", "identity": "'$IDA1'", "did": "'"$DIDA1"'", "name": "'"$NAMEA1"'"}})'
|
||||
}
|
||||
|
||||
doc_keyringAdd="REST API add keyring identity"
|
||||
|
Loading…
Reference in New Issue
Block a user