Skip to content

Commit 1573674

Browse files
committed
added more references to the group response format
1 parent abda630 commit 1573674

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app/V1Module/presenters/GroupsPresenter.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ private function setGroupPoints(Request $req, Group $group): void
292292
"If true, no admin is assigned to group (current user is assigned as admin by default.",
293293
required: false,
294294
)]
295+
#[ResponseFormat(GroupFormat::class)]
295296
public function actionAddGroup()
296297
{
297298
$req = $this->getRequest();
@@ -448,6 +449,7 @@ public function checkSetOrganizational(string $id)
448449
*/
449450
#[Post("value", new VBool(), "The value of the flag", required: true)]
450451
#[Path("id", new VUuid(), "An identifier of the updated group", required: true)]
452+
#[ResponseFormat(GroupFormat::class)]
451453
public function actionSetOrganizational(string $id)
452454
{
453455
$group = $this->groups->findOrThrow($id);
@@ -484,6 +486,7 @@ public function checkSetArchived(string $id)
484486
*/
485487
#[Post("value", new VBool(), "The value of the flag", required: true)]
486488
#[Path("id", new VUuid(), "An identifier of the updated group", required: true)]
489+
#[ResponseFormat(GroupFormat::class)]
487490
public function actionSetArchived(string $id)
488491
{
489492
$group = $this->groups->findOrThrow($id);
@@ -566,6 +569,7 @@ public function checkSetExam(string $id)
566569
*/
567570
#[Post("value", new VBool(), "The value of the flag", required: true)]
568571
#[Path("id", new VUuid(), "An identifier of the updated group", required: true)]
572+
#[ResponseFormat(GroupFormat::class)]
569573
public function actionSetExam(string $id)
570574
{
571575
$group = $this->groups->findOrThrow($id);
@@ -606,6 +610,7 @@ public function checkSetExamPeriod(string $id)
606610
)]
607611
#[Post("strict", new VBool(), "Whether locked users are prevented from accessing other groups.", required: false)]
608612
#[Path("id", new VUuid(), "An identifier of the updated group", required: true)]
613+
#[ResponseFormat(GroupFormat::class)]
609614
public function actionSetExamPeriod(string $id)
610615
{
611616
$group = $this->groups->findOrThrow($id);
@@ -719,6 +724,7 @@ public function checkRemoveExamPeriod(string $id)
719724
* @throws NotFoundException
720725
*/
721726
#[Path("id", new VUuid(), "An identifier of the updated group", required: true)]
727+
#[ResponseFormat(GroupFormat::class)]
722728
public function actionRemoveExamPeriod(string $id)
723729
{
724730
$group = $this->groups->findOrThrow($id);
@@ -865,6 +871,7 @@ public function checkDetail(string $id)
865871
* @GET
866872
*/
867873
#[Path("id", new VUuid(), "Identifier of the group", required: true)]
874+
#[ResponseFormat(GroupFormat::class)]
868875
public function actionDetail(string $id)
869876
{
870877
$group = $this->groups->findOrThrow($id);
@@ -953,6 +960,7 @@ public function checkAddMember(string $id, string $userId)
953960
#[Post("type", new VString(1), "Identifier of membership type (admin, supervisor, ...)", required: true)]
954961
#[Path("id", new VUuid(), "Identifier of the group", required: true)]
955962
#[Path("userId", new VString(), "Identifier of the supervisor", required: true)]
963+
#[ResponseFormat(GroupFormat::class)]
956964
public function actionAddMember(string $id, string $userId)
957965
{
958966
$user = $this->users->findOrThrow($userId);
@@ -999,6 +1007,7 @@ public function checkRemoveMember(string $id, string $userId)
9991007
*/
10001008
#[Path("id", new VUuid(), "Identifier of the group", required: true)]
10011009
#[Path("userId", new VString(), "Identifier of the supervisor", required: true)]
1010+
#[ResponseFormat(GroupFormat::class)]
10021011
public function actionRemoveMember(string $id, string $userId)
10031012
{
10041013
$user = $this->users->findOrThrow($userId);
@@ -1217,6 +1226,7 @@ public function checkAddStudent(string $id, string $userId)
12171226
*/
12181227
#[Path("id", new VUuid(), "Identifier of the group", required: true)]
12191228
#[Path("userId", new VString(), "Identifier of the student", required: true)]
1229+
#[ResponseFormat(GroupFormat::class)]
12201230
public function actionAddStudent(string $id, string $userId)
12211231
{
12221232
$user = $this->users->findOrThrow($userId);
@@ -1248,6 +1258,7 @@ public function checkRemoveStudent(string $id, string $userId)
12481258
*/
12491259
#[Path("id", new VUuid(), "Identifier of the group", required: true)]
12501260
#[Path("userId", new VString(), "Identifier of the student", required: true)]
1261+
#[ResponseFormat(GroupFormat::class)]
12511262
public function actionRemoveStudent(string $id, string $userId)
12521263
{
12531264
$user = $this->users->findOrThrow($userId);

0 commit comments

Comments
 (0)