Skip to content

Commit

Permalink
refactor(web): add ctx data definition
Browse files Browse the repository at this point in the history
  • Loading branch information
newfish-cmyk committed Oct 9, 2023
1 parent 4f98053 commit 3cdec5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions web/src/components/Editor/typesResolve/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ interface File {
* The input parameters of cloud function calls
*/
interface FunctionContext {
__function_name: string;
/**
* This object is parsed from JWT Token Payload
* @deprecated use user instead
Expand Down
2 changes: 1 addition & 1 deletion web/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const COLOR_MODE = {
dark: "dark",
};

export const DEFAULT_CODE = `import cloud, { FunctionContext } from '@lafjs/cloud'
export const DEFAULT_CODE = `import cloud from '@lafjs/cloud'
export default async function (ctx: FunctionContext) {
console.log('Hello World')
Expand Down

0 comments on commit 3cdec5c

Please sign in to comment.