Skip to content

Rename a profile through v2 PATCH instead of writing profiles.name directly #837

Description

@hokiepokedad2

Blocked on jfberry/PoracleNG#217.

ProfileController.Rename writes to profiles.name through IProfileRepository.RenameAsync — a direct database write — because PoracleNG's POST /api/profiles/{id}/update answers {"status":"ok"} and silently writes nothing for a rename, while honouring active_hours on the same request. Same class of workaround as HACK: trusted-set-areas. See #406.

#217 makes PATCH /v2/humans/{id}/profiles/{n} a real PATCH: name and active_hours are independently optional, only the fields present are written, and a body with neither is 422 rather than a cheerful ok over a no-op.

Delete

  • ProfileController.cs:243 — the RenameAsync call, replaced by the v2 PATCH
  • IProfileRepository.RenameAsync and its implementation in ProfileRepository.cs:27

Watch for

IProfileRepository does not go away with it. It still serves admin bulk operations and the non-active-profile cleanup in UserGeofenceService. Only the rename method leaves.

Don't confuse it with IUserGeofenceService.RenameAsync (UserGeofenceController.cs:44), which is unrelated and stays.

CLAUDE.md's "Profile Numbering and Rename" section documents this as current behaviour and needs updating alongside #836.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions