feat(device-manager): align functional UI with Mission Core interaction patterns
Device Core qualification / qualify (push) Successful in 8m53s
Device Core qualification / qualify (push) Successful in 8m53s
This commit is contained in:
@@ -20,10 +20,10 @@ const messages: Record<string, string> = {
|
||||
b2_company_mismatch: 'Выберите проект той же компании.',
|
||||
device_owner_scope_access_denied: 'Настройки общего VPS доступны администратору компании.',
|
||||
};
|
||||
export async function b2Request<T>(projectRef: string, hostRef: string, action: string, fields: Record<string, unknown> = {}): Promise<T> {
|
||||
export async function b2Request<T>(projectRef: string, hostRef: string, action: string, fields: Record<string, unknown> = {}, requestId = crypto.randomUUID().replaceAll('-', '')): Promise<T> {
|
||||
const response = await fetch('/api/device-manager/b2/infrastructure', {
|
||||
method: 'POST', credentials: 'same-origin',
|
||||
headers: { 'Content-Type': 'application/json', 'Idempotency-Key': crypto.randomUUID().replaceAll('-', '') },
|
||||
headers: { 'Content-Type': 'application/json', 'Idempotency-Key': requestId },
|
||||
body: JSON.stringify({ projectRef, hostRef, action, ...fields }),
|
||||
});
|
||||
const body = await response.json().catch(() => null);
|
||||
|
||||
Reference in New Issue
Block a user