ayo
ayo
WWasp-lang
Created by ayo on 11/8/2024 in #đŸ™‹questions
input coming back as undefined
Hi, I'm trying to implement a new action in, but my input args keep coming back as undefined. Here's is the flow I've followed from the docs curl eample:
curl -X POST http://localhost:3001/operations/follow-user \\
-H "Authorization: Bearer rwlvofoswke5w5naewjlrafuo5krkt5ulsgnpqcp" \\
-H "Content-Type: application/json" \\
-d '{"id":"599a3222-f137-4584-bea4-e327d48fef1f","followerId":"f2be6fba-7235-4d46-b630-77a638f1a825","followingId":"01959677-845f-4f4c-b886-4ca971d8d21","createdAt":"2024-10-28T21:23:34.371Z"}'
curl -X POST http://localhost:3001/operations/follow-user \\
-H "Authorization: Bearer rwlvofoswke5w5naewjlrafuo5krkt5ulsgnpqcp" \\
-H "Content-Type: application/json" \\
-d '{"id":"599a3222-f137-4584-bea4-e327d48fef1f","followerId":"f2be6fba-7235-4d46-b630-77a638f1a825","followingId":"01959677-845f-4f4c-b886-4ca971d8d21","createdAt":"2024-10-28T21:23:34.371Z"}'
main.wasp
action followUser {
fn: import { followUser } from "@src/user/operations",
entities: [User, Follow],
}
action followUser {
fn: import { followUser } from "@src/user/operations",
entities: [User, Follow],
}
@src/user/operations
import {
type FollowUser,
} from 'wasp/server/operations';

import { type User , Follow } from 'wasp/entities';

export const followUser: FollowUser<Pick<Follow, "followingId">, { success: boolean }> = async (
{ followingId } ,
context,
) => {console.log('followingId:', followingId);... prisma logic}
import {
type FollowUser,
} from 'wasp/server/operations';

import { type User , Follow } from 'wasp/entities';

export const followUser: FollowUser<Pick<Follow, "followingId">, { success: boolean }> = async (
{ followingId } ,
context,
) => {console.log('followingId:', followingId);... prisma logic}
std.out
followingId: undefined
followingId: undefined
11 replies
WWasp-lang
Created by ayo on 10/28/2024 in #đŸ™‹questions
microservice
Is wasp built to be used in a microservice architecture or is it not encouraged?
10 replies
WWasp-lang
Created by ayo on 10/26/2024 in #đŸ™‹questions
No MainPage.tsx
I recently began walking through the docs starting with the quick start guide. I have since gotten the the app to start, moving on to https://wasp-lang.dev/docs/tutorial/project-structure where I see a reference to src/MainPage.tsx . I do not have this file in my template app. was version 0.14.2 platform: macOs
9 replies