mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Add specific immutable_field error codes
This commit is contained in:
parent
2bc60c29fc
commit
7f80b116bc
5 changed files with 51 additions and 18 deletions
|
@ -80,12 +80,12 @@ fn deny_immutable_fields_api_key(
|
|||
));
|
||||
|
||||
error.code = match field {
|
||||
"uid" => Code::ImmutableField,
|
||||
"actions" => Code::ImmutableField,
|
||||
"indexes" => Code::ImmutableField,
|
||||
"expiresAt" => Code::ImmutableField,
|
||||
"createdAt" => Code::ImmutableField,
|
||||
"updatedAt" => Code::ImmutableField,
|
||||
"uid" => Code::ImmutableApiKeyUid,
|
||||
"actions" => Code::ImmutableApiKeyActions,
|
||||
"indexes" => Code::ImmutableApiKeyIndexes,
|
||||
"expiresAt" => Code::ImmutableApiKeyExpiresAt,
|
||||
"createdAt" => Code::ImmutableApiKeyCreatedAt,
|
||||
"updatedAt" => Code::ImmutableApiKeyUpdatedAt,
|
||||
_ => Code::BadRequest,
|
||||
};
|
||||
error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue