internal action not showing arguments
I am passing my args from an action to an internal action but the console logging args in internal action the args are coming up empty
export const postOnLinkedIn = action({
args: {
campaignId: v.string(),
},
async handler(ctx, args) {
const identity = await ctx.auth.getUserIdentity();
// if (!identity) {
// throw new Error("Unauthenticated call to mutation");
// }
await ctx.scheduler.runAfter(0, internal.linkedin.internalPostOnLinkedIn, {
userToken:
"test",
campaignId: "test",
});
},
});
export const internalPostOnLinkedIn = internalAction({
args: {
userToken: v.string(),
campaignId: v.string(),
},
handler: async (ctx, args) => {
console.log("Auth token", args.userToken);
console.log("Campaign ID", args.campaignId);
}})export const postOnLinkedIn = action({
args: {
campaignId: v.string(),
},
async handler(ctx, args) {
const identity = await ctx.auth.getUserIdentity();
// if (!identity) {
// throw new Error("Unauthenticated call to mutation");
// }
await ctx.scheduler.runAfter(0, internal.linkedin.internalPostOnLinkedIn, {
userToken:
"test",
campaignId: "test",
});
},
});
export const internalPostOnLinkedIn = internalAction({
args: {
userToken: v.string(),
campaignId: v.string(),
},
handler: async (ctx, args) => {
console.log("Auth token", args.userToken);
console.log("Campaign ID", args.campaignId);
}})
