Skip to content

Api Improvements#19

Draft
MrUprizing wants to merge 3 commits intomainfrom
feat/api
Draft

Api Improvements#19
MrUprizing wants to merge 3 commits intomainfrom
feat/api

Conversation

@MrUprizing
Copy link
Member

This pull request introduces Go code execution support to the API, alongside infrastructure and routing improvements. The main changes include adding a Go Lambda function, updating the API to route Go code execution requests, and enhancing the infrastructure to support the new function. Additional improvements include API routing enhancements and updated server URLs.

Go code execution support:

  • Added a new Go Lambda function using Yaegi for code interpretation (apps/functions/go/main.go, apps/functions/go/go.mod). [1] [2]
  • Registered the Go Lambda function in the infrastructure and updated permissions and environment variables to support its invocation (infra/functions.ts).

API and routing enhancements:

  • Added a new API route /run/go that validates requests and invokes the Go Lambda function, returning execution output and timing (apps/api/src/routes/run/go.ts).
  • Registered the Go route with the main run router, ensuring authenticated access (apps/api/src/routes/run/index.ts).
  • Set up a custom router resource with domain support for production and development environments (infra/router.ts).

General API improvements:

  • Updated the API entrypoint to use a base path, add logging middleware, and use the custom router resource for server URLs (apps/api/src/index.ts). [1] [2]

@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
exec0 Error Error Jan 29, 2026 8:18pm

@MrUprizing
Copy link
Member Author

Closes #15

When verifying API keys, keypal calls updateMetadata to track lastUsedAt.
The previous implementation did a full replace of the metadata object,
which caused other fields like 'name' and 'description' to be lost.

Now using a dynamic update expression that merges individual fields
instead of replacing the entire metadata object. This preserves all
existing metadata while updating only the specified fields.

Fixes issue where API keys would show as 'Unnamed Key' after first use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments