Default request name to URL(ish)

This commit is contained in:
Gregory Schier
2023-11-09 16:47:00 -08:00
parent 97c5d2c7eb
commit c09bea29a2
3 changed files with 79 additions and 60 deletions

View File

@@ -23,9 +23,8 @@ export function useCreateRequest() {
if (workspaceId === null) {
throw new Error("Cannot create request when there's no active workspace");
}
patch.name = patch.name || 'New Request';
patch.sortPriority = patch.sortPriority || maxSortPriority(requests) + 1000;
return invoke('create_request', { workspaceId, ...patch });
return invoke('create_request', { workspaceId, name: '', ...patch });
},
onSettled: () => trackEvent('http_request', 'create'),
onSuccess: async (request) => {