MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / EditAPIKey

Method EditAPIKey

internal/tui/client.go:268–273  ·  view source on GitHub ↗

EditAPIKey replaces an API key at the given index.

(index int, newValue string)

Source from the content-addressed store, hash-verified

266
267// EditAPIKey replaces an API key at the given index.
268func (c *Client) EditAPIKey(index int, newValue string) error {
269 body := map[string]any{"index": index, "value": newValue}
270 jsonBody, _ := json.Marshal(body)
271 _, err := c.patch("/v0/management/api-keys", strings.NewReader(string(jsonBody)))
272 return err
273}
274
275// DeleteAPIKey deletes an API key by index.
276func (c *Client) DeleteAPIKey(index int) error {

Callers 1

UpdateMethod · 0.80

Calls 1

patchMethod · 0.95

Tested by

no test coverage detected