Skip to content

Commit 7782006

Browse files
authored
fix: update incorrect update trigger api url (#394)
1 parent a825e82 commit 7782006

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/web-v2/src/hooks/use-triggers.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ export function useTriggers() {
188188
// For RESTful API, we need to update each registration individually
189189
for (const triggerId of args.selectedTriggerIds) {
190190
const triggerApiUrl = constructTriggerUrl(
191-
`/api/triggers/registrations/${triggerId}/agents`,
191+
`/api/triggers/registrations/${triggerId}/agents/${args.agentId}`,
192192
);
193193
if (!triggerApiUrl) {
194194
return false;
195195
}
196196

197197
const response = await fetch(triggerApiUrl, {
198-
method: "PUT",
198+
method: "POST",
199199
headers: {
200200
Authorization: `Bearer ${accessToken}`,
201201
"Content-Type": "application/json",

0 commit comments

Comments
 (0)