Skip to content

Commit

Permalink
Add nid to general_info API endpoint, which the iOS app breaks wi…
Browse files Browse the repository at this point in the history
…thout [MA-156]
  • Loading branch information
nikhiltri committed Feb 27, 2024
1 parent 68c145e commit e594746
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Http/Controllers/Api/GeneralInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Http\Controllers\Api;

use App\Models\Label;
use App\Http\Controllers\Controller;
use App\Repositories\LabelRepository;
use App\Repositories\Serializers\GeneralInfoSerializer;
Expand All @@ -14,6 +15,9 @@ public function __invoke()
$repository = App::make(LabelRepository::class);
$labels = $repository->getBaseModel()->newQuery()->get();
$serializer = new GeneralInfoSerializer();
return $serializer->serialize($labels);
$nid = new Label;
$nid->key = 'nid';
$nid->text = '1';
return $serializer->serialize($labels->concat([$nid]));
}
}

0 comments on commit e594746

Please sign in to comment.