Fix ccc-queue triggering client main() on import
Move resolve_queue_item into conduit.mjs factory and have ccc-queue import from there instead of index.mjs, which auto-executes main(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,10 +26,18 @@ export function create_conduit_client(username, secret) {
|
||||
|
||||
async function get_queue() {
|
||||
const res = await fetch(`${BASE_URL}/queue`, {
|
||||
headers: auth_headers(""),
|
||||
headers: auth_headers(''),
|
||||
});
|
||||
return res.json();
|
||||
}
|
||||
|
||||
return { call_action, list_actions, get_queue };
|
||||
async function resolve_queue_item(id, decision) {
|
||||
const res = await fetch(`${BASE_URL}/queue/${id}/${decision}`, {
|
||||
method: 'POST',
|
||||
headers: auth_headers(''),
|
||||
});
|
||||
return res.json();
|
||||
}
|
||||
|
||||
return { call_action, list_actions, get_queue, resolve_queue_item };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user