Skip to content

[Enhancement] Return zero/empty arrays instead of null #45

@asimons04

Description

@asimons04

Instead of returning null for certain keys in the API responses, consider returning 0 for numeric values or an empty array [] for values that, if populated, would normally return an array.

This would make interfacing with the API much easier for Javascript/Typescript (possibly other languages as well).

Example Candidates:

  • approvals (0)
  • endorsements (0)
  • sysadmins (0)
  • moderators (0)
  • tags ([])
  • censure_reasons ([])
  • censure_evidence ([])
  • censure_count (0)
  • endorsement_reasons ([])
  • hesitation_reasons ([])
  • hesitation_evidence ([])
  • hesitation_count (0)

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