Function create_api_key

Source
pub async fn create_api_key<J, RR, TR, NR, NFR, SR, TCR, PR, AKR>(
    api_key_request: ApiKeyRequest,
    state: ThinDataAppState<J, RR, TR, NR, NFR, SR, TCR, PR, AKR>,
) -> Result<HttpResponse, ApiError>
Expand description

Create api key

§Arguments

  • api_key_request - The api key request.
    • name - The name of the api key.
    • allowed_origins - The allowed origins for the api key.
    • permissions - The permissions for the api key.
  • state - The application state containing the api key repository.

§Returns

The result of the plugin call.