Skip to content

Commit

Permalink
fix(cli): func desc missing caused by typo (#1832)
Browse files Browse the repository at this point in the history
  • Loading branch information
aFlyBird0 committed Jan 30, 2024
1 parent 77be144 commit 3816b3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cli/src/action/function/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function pull(funcName: string) {
const func = await functionControllerFindOne(appSchema.appid, urlencode(funcName))
const functionSchema: FunctionSchema = {
name: func.name,
description: func.description,
desc: func.desc,
methods: func.methods,
tags: func.tags,
}
Expand Down Expand Up @@ -131,15 +131,15 @@ async function push(funcName: string, isCreate: boolean) {
if (isCreate) {
const createDto: CreateFunctionDto = {
name: funcName,
description: funcSchema.description || '',
description: funcSchema.desc || '',
methods: funcSchema.methods as any,
code,
tags: funcSchema.tags,
}
await functionControllerCreate(appSchema.appid, createDto)
} else {
const updateDto: UpdateFunctionDto = {
description: funcSchema.description || '',
description: funcSchema.desc || '',
methods: funcSchema.methods as any,
code,
tags: funcSchema.tags,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/schema/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { mkdirSync } from 'fs'

export class FunctionSchema {
name: string
description?: string
desc?: string
tags?: string[]
methods: string[]

Expand Down

0 comments on commit 3816b3f

Please sign in to comment.