diff --git a/docs/E2E_TESTING.md b/docs/E2E_TESTING.md index e6888be..5bf0b26 100644 --- a/docs/E2E_TESTING.md +++ b/docs/E2E_TESTING.md @@ -93,7 +93,7 @@ Check AppView logs: Query via API: ```bash -curl "http://localhost:8081/xrpc/social.coves.actor.getProfile?actor=alice.local.coves.dev" +curl "http://localhost:8081/xrpc/social.coves.actor.getprofile?actor=alice.local.coves.dev" ``` Expected response: diff --git a/internal/api/routes/user.go b/internal/api/routes/user.go index e0f942c..8ed003a 100644 --- a/internal/api/routes/user.go +++ b/internal/api/routes/user.go @@ -28,14 +28,14 @@ func NewUserHandler(userService users.UserService) *UserHandler { func RegisterUserRoutes(r chi.Router, service users.UserService) { h := NewUserHandler(service) - // social.coves.actor.getProfile - query endpoint - r.Get("/xrpc/social.coves.actor.getProfile", h.GetProfile) + // social.coves.actor.getprofile - query endpoint + r.Get("/xrpc/social.coves.actor.getprofile", h.GetProfile) // social.coves.actor.signup - procedure endpoint r.Post("/xrpc/social.coves.actor.signup", h.Signup) } -// GetProfile handles social.coves.actor.getProfile +// GetProfile handles social.coves.actor.getprofile // Query endpoint that retrieves a user profile by DID or handle func (h *UserHandler) GetProfile(w http.ResponseWriter, r *http.Request) { ctx := r.Context() diff --git a/internal/atproto/lexicon/social/coves/actor/getProfile.json b/internal/atproto/lexicon/social/coves/actor/getProfile.json index 77c7b55..315dc81 100644 --- a/internal/atproto/lexicon/social/coves/actor/getProfile.json +++ b/internal/atproto/lexicon/social/coves/actor/getProfile.json @@ -1,6 +1,6 @@ { "lexicon": 1, - "id": "social.coves.actor.getProfile", + "id": "social.coves.actor.getprofile", "defs": { "main": { "type": "query", diff --git a/internal/atproto/lexicon/social/coves/actor/updateProfile.json b/internal/atproto/lexicon/social/coves/actor/updateProfile.json index a9c9863..19b9184 100644 --- a/internal/atproto/lexicon/social/coves/actor/updateProfile.json +++ b/internal/atproto/lexicon/social/coves/actor/updateProfile.json @@ -1,6 +1,6 @@ { "lexicon": 1, - "id": "social.coves.actor.updateProfile", + "id": "social.coves.actor.updateprofile", "defs": { "main": { "type": "procedure", diff --git a/tests/integration/user_test.go b/tests/integration/user_test.go index 19ca4c1..3067bc4 100644 --- a/tests/integration/user_test.go +++ b/tests/integration/user_test.go @@ -189,7 +189,7 @@ func TestGetProfileEndpoint(t *testing.T) { // Test 1: Get profile by DID t.Run("Get Profile By DID", func(t *testing.T) { - req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getProfile?actor=did:plc:endpoint123", nil) + req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getprofile?actor=did:plc:endpoint123", nil) w := httptest.NewRecorder() r.ServeHTTP(w, req) @@ -210,7 +210,7 @@ func TestGetProfileEndpoint(t *testing.T) { // Test 2: Get profile by handle t.Run("Get Profile By Handle", func(t *testing.T) { - req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getProfile?actor=bob.test", nil) + req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getprofile?actor=bob.test", nil) w := httptest.NewRecorder() r.ServeHTTP(w, req) @@ -232,7 +232,7 @@ func TestGetProfileEndpoint(t *testing.T) { // Test 3: Missing actor parameter t.Run("Missing Actor Parameter", func(t *testing.T) { - req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getProfile", nil) + req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getprofile", nil) w := httptest.NewRecorder() r.ServeHTTP(w, req) @@ -243,7 +243,7 @@ func TestGetProfileEndpoint(t *testing.T) { // Test 4: User not found t.Run("User Not Found", func(t *testing.T) { - req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getProfile?actor=nonexistent.test", nil) + req := httptest.NewRequest("GET", "/xrpc/social.coves.actor.getprofile?actor=nonexistent.test", nil) w := httptest.NewRecorder() r.ServeHTTP(w, req)