feat(drive): improve drive edition from owners

This commit is contained in:
Edouard Vanbelle
2026-06-24 01:51:05 +02:00
parent d77846119f
commit 6034dd47d9
8 changed files with 214 additions and 116 deletions
+4 -1
View File
@@ -52,8 +52,11 @@ async function systemContacts(includeSelf = false): Promise<Contact[]> {
const cached = includeSelf ? contactCacheWithSelf : contactCache;
if (cached) return cached;
try {
// `?include_self=true` (not `=1`) — Axum's `Query` extractor uses
// `serde_urlencoded`, which only deserialises `"true"`/`"false"`
// for `bool`. Sending `=1` would 400 before the handler runs.
const url = includeSelf
? '/api/address-books/system/contacts?include_self=1'
? '/api/address-books/system/contacts?include_self=true'
: '/api/address-books/system/contacts';
const res = await apiFetch(url, { credentials: 'same-origin' });
if (!res.ok) {