From bf00689d55ef3047daa470d753d01dc811d64d6d Mon Sep 17 00:00:00 2001 From: Sam Judelson <64875465+sjud@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:39:09 -0500 Subject: [PATCH] add comment specifying edgecase of server function prefixes --- leptos_macro/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/leptos_macro/src/lib.rs b/leptos_macro/src/lib.rs index 6beebf3212..3fa20d47c2 100644 --- a/leptos_macro/src/lib.rs +++ b/leptos_macro/src/lib.rs @@ -869,7 +869,8 @@ pub fn slot(args: proc_macro::TokenStream, s: TokenStream) -> TokenStream { /// You can provide any combination of the following named arguments: /// - `name`: sets the identifier for the server function’s type, which is a struct created /// to hold the arguments (defaults to the function identifier in PascalCase) -/// - `prefix`: a prefix at which the server function handler will be mounted (defaults to `/api`) +/// - `prefix`: a prefix at which the server function handler will be mounted (defaults to `/api`) +/// your prefix must begin with `/`. Otherwise your function won't be found. /// - `endpoint`: specifies the exact path at which the server function handler will be mounted, /// relative to the prefix (defaults to the function name followed by unique hash) /// - `input`: the encoding for the arguments (defaults to `PostUrl`)