all: add pin protected deactivation

This commit is contained in:
Cuong Manh Le
2024-02-01 20:43:03 +07:00
committed by Cuong Manh Le
parent 0826671809
commit d822bf4257
5 changed files with 86 additions and 6 deletions

View File

@@ -27,3 +27,8 @@ func newControlClient(addr string) *controlClient {
func (c *controlClient) post(path string, data io.Reader) (*http.Response, error) {
return c.c.Post("http://unix"+path, contentTypeJson, data)
}
// deactivationRequest represents request for validating deactivation pin.
type deactivationRequest struct {
Pin int64 `json:"pin"`
}