@primocaredentgroup/convex-campaigns-component 0.3.12 → 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,17 +3,6 @@ import { action } from "../../../_generated/server";
|
|
|
3
3
|
import { internal } from "../../../_generated/api";
|
|
4
4
|
import { assertAuthorized } from "../permissions";
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Riferimento alla mutation che esegue il tick. L'API generata dall'host espone
|
|
8
|
-
* la mutation sotto functions.internal, non campaignsInternal.
|
|
9
|
-
*/
|
|
10
|
-
function getRunTickMutationRef(): any {
|
|
11
|
-
const i = internal as any;
|
|
12
|
-
return (
|
|
13
|
-
i?.components?.campaigns?.functions?.internal?.runTickMutation ??
|
|
14
|
-
i?.functions?.internal?.runTickMutation
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
6
|
|
|
18
7
|
async function isDuplicateByIdempotencyKey(ctx: any, idempotencyKey?: string) {
|
|
19
8
|
if (!idempotencyKey) return false;
|
|
@@ -99,8 +88,8 @@ export const runTick: any = action({
|
|
|
99
88
|
args: {},
|
|
100
89
|
handler: async (ctx) => {
|
|
101
90
|
await assertAuthorized(ctx, ["System", "Admin", "Marketing"]);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return ctx.runMutation(
|
|
91
|
+
// Path dalla struttura del componente: internal → functions → internal → runTickMutation
|
|
92
|
+
// Non usare components.campaigns (quello è solo nell'host)
|
|
93
|
+
return ctx.runMutation(internal.functions.internal.runTickMutation, {});
|
|
105
94
|
},
|
|
106
95
|
});
|