feat: add last_active_at column and POST /v1/users/me/ping endpoint#954
Merged
Conversation
…et auth The handler was using getAuthedWallet(c) which required signature-based auth, then updating by wallet address. This was overcomplicated for a fire-and-forget activity signal. Now uses myId from the user_id query param (already decoded by resolveMyIdMiddleware) and updates by user_id. Removes requireAuthMiddleware from the route since the handler no longer needs the wallet — the global authMiddleware still validates signatures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15630c6 to
3daef34
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
last_active_attimestamp column to theuserstable (migration 0221)POST /v1/users/me/ping?user_id=<encoded_id>endpoint that updates the user'slast_active_attonow()user_idfrom query param (decoded byresolveMyIdMiddleware) — no wallet-based auth needed for this low-security activity signalrequireUserIdMiddlewarefor/users/me/*routes so theg.Use("/users/:userId")prefix middleware doesn't block literal/users/me/pingTest plan
POST /v1/users/me/ping?user_id=<encoded_id>returns{"status":"ok"}with valid signature headerslast_active_atis updated in the DB after a successful pinguser_idreturns 400🤖 Generated with Claude Code