Page MenuHomePhorge

Code de-duplication, API unification
ClosedPublic

Authored by machniak on Nov 18 2021, 1:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 7:38 AM
Unknown Object (File)
Feb 25 2024, 7:09 PM
Unknown Object (File)
Feb 25 2024, 1:30 PM
Unknown Object (File)
Feb 15 2024, 5:22 AM
Unknown Object (File)
Feb 14 2024, 3:25 PM
Unknown Object (File)
Jan 24 2024, 4:57 AM
Unknown Object (File)
Jan 24 2024, 4:57 AM
Unknown Object (File)
Jan 24 2024, 4:56 AM
Subscribers
Restricted Project

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rK4211ad138d60: Code de-duplication, API unification
Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Branch
dev/dedup
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 37130
Build 14834: arc lint + arc unit

Event Timeline

machniak created this revision.
  • De-duplicate code for handling status update process
mollekopf subscribed.
mollekopf added inline comments.
src/app/Http/Controllers/Controller.php
207

Personally I would prefer passing $objectProps as argument instead of $full, unless $objectProps becomes useful for other functions as well.

It would make it a bit clearer IMO what's going on: Either you serialize everything, or just the requested $objectProps.

That's not a blocker though.

This revision is now accepted and ready to land.Nov 19 2021, 2:39 PM
src/app/Http/Controllers/Controller.php
207

Yes, but this way we define the common props once (per object type), so we don't have to pass them all the time as an argument. This makes also the API responses unified "automatically", i.e. reseller, admin, user end-points, all of them return the same set of object properties.

This revision was automatically updated to reflect the committed changes.