update-function
Modify existing edge function code or metadata to update functionality, change status between draft and active, or revise descriptions and names.
Instructions
Update an existing edge function code or metadata
Input Schema
Name | Required | Description | Default |
---|---|---|---|
codeFile | No | Path to JavaScript file containing the new function code. Must export: module.exports = async function(request) { return new Response(...) } | |
description | No | ||
name | No | ||
slug | Yes | The slug identifier of the function to update | |
status | No |
Input Schema (JSON Schema)
{
"properties": {
"codeFile": {
"description": "Path to JavaScript file containing the new function code. Must export: module.exports = async function(request) { return new Response(...) }",
"type": "string"
},
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"description": "The slug identifier of the function to update",
"type": "string"
},
"status": {
"enum": [
"draft",
"active"
],
"type": "string"
}
},
"required": [
"slug"
],
"type": "object"
}