This commit is contained in:
Mubelotix 2025-06-19 13:10:08 +02:00
parent 99732f4084
commit 67f2a30d7c
No known key found for this signature in database
GPG key ID: 89F391DBCC8CE7F0

View file

@ -790,7 +790,7 @@ async fn list_api_keys() {
meili_snap::snapshot!(code, @"201 Created");
let (response, code) = server.list_api_keys("").await;
meili_snap::snapshot!(meili_snap::json_string!(response, { ".results[].createdAt" => "[ignored]", ".results[].updatedAt" => "[ignored]", ".results[].uid" => "[ignored]", ".results[].key" => "[ignored]" }), @r###"
meili_snap::snapshot!(meili_snap::json_string!(response, { ".results[].createdAt" => "[ignored]", ".results[].updatedAt" => "[ignored]", ".results[0].uid" => "[ignored]", ".results[].key" => "[ignored]" }), @r#"
{
"results": [
{
@ -824,7 +824,7 @@ async fn list_api_keys() {
"name": "Default Search API Key",
"description": "Use it to search from the frontend",
"key": "[ignored]",
"uid": "[ignored]",
"uid": "00000000-0000-0000-0000-000000000002",
"actions": [
"search"
],
@ -839,7 +839,7 @@ async fn list_api_keys() {
"name": "Default Admin API Key",
"description": "Use it for anything that is not a search operation. Caution! Do not expose it on a public frontend",
"key": "[ignored]",
"uid": "[ignored]",
"uid": "00000000-0000-0000-0000-000000000000",
"actions": [
"*"
],
@ -850,11 +850,26 @@ async fn list_api_keys() {
"createdAt": "[ignored]",
"updatedAt": "[ignored]"
},
{
"name": "Default Read-Only Admin API Key",
"description": "Use it to peek into the instance in a read-only mode. Caution! Do not expose it on a public frontend. It would give access to all other keys",
"key": "[ignored]",
"uid": "00000000-0000-0000-0000-000000000001",
"actions": [
"*.get"
],
"indexes": [
"*"
],
"expiresAt": null,
"createdAt": "[ignored]",
"updatedAt": "[ignored]"
},
{
"name": "Default Chat API Key",
"description": "Use it to chat and search from the frontend",
"key": "[ignored]",
"uid": "[ignored]",
"uid": "00000000-0000-0000-0000-000000000003",
"actions": [
"chatCompletions",
"search"
@ -869,9 +884,9 @@ async fn list_api_keys() {
],
"offset": 0,
"limit": 20,
"total": 4
"total": 5
}
"###);
"#);
meili_snap::snapshot!(code, @"200 OK");
}