Skip to content

Commit

Permalink
Merge pull request #4273 from systeminit/victor/fix-save-code
Browse files Browse the repository at this point in the history
fix: point PUT /func/:id/code to the correct function
  • Loading branch information
vbustamante authored Aug 2, 2024
2 parents 5b46ab9 + ae1fc55 commit e37857a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/web/src/store/func/funcs.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ export const useFuncStore = () => {

async SAVE_FUNC(func: FuncCode) {
return new ApiRequest<FuncCode>({
method: "post",
method: "put",
url: `${API_PREFIX}/${func.funcId}/code`,
params: { code: func.code },
onFail: () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/sdf-server/src/server/service/v2/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub fn v2_routes() -> Router<AppState> {
.route("/runs/:func_run_id", get(get_func_run::get_func_run)) // accepts a list of func_ids
.route("/", post(create_func::create_func))
.route("/:func_id", put(update_func::update_func)) // only save the func's metadata
.route("/:func_id/code", post(get_func_run::get_func_run)) // only saves func code
.route("/:func_id/code", put(save_code::save_code)) // only saves func code
.route("/:func_id/test_execute", post(test_execute::test_execute))
.route("/:func_id/execute", post(execute_func::execute_func))
.route(
Expand Down

0 comments on commit e37857a

Please sign in to comment.