From 8114bfc546df46773da9d7c2ee477a3d6e503c3c Mon Sep 17 00:00:00 2001 From: gevorgmansuryan Date: Thu, 25 Jul 2024 02:59:10 +0400 Subject: [PATCH] Endpoint for pending invites - Extended response --- definitions/InviteDefinitions.php | 6 +----- docs/CHANGELOG.md | 1 + docs/html/user.html | 4 ++-- docs/swagger/user.yaml | 32 +++++++++++++++++++++++++++++++ models/Invite.php | 25 ------------------------ module.json | 2 +- 6 files changed, 37 insertions(+), 33 deletions(-) delete mode 100644 models/Invite.php diff --git a/definitions/InviteDefinitions.php b/definitions/InviteDefinitions.php index bf673c5..fdae824 100644 --- a/definitions/InviteDefinitions.php +++ b/definitions/InviteDefinitions.php @@ -6,11 +6,7 @@ class InviteDefinitions { - /** - * @param Invite|\humhub\modules\rest\models\Invite $invite - * @return array - */ - public static function getInvite(Invite $invite) + public static function getInvite(Invite $invite): array { return [ 'id' => $invite->id, diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 30dbb64..cbff197 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,6 +6,7 @@ Changelog - Enh #155: Add `requirements.php` - Fix #164: Disable `mustChangePassword` check for impersonated access tokens - Enh #170: Added new endpoint `GET /user/invite` for user pending invites +- Enh #171: Extended invite information in response of `GET /user/invite` endpoint 0.9.3 (December 8, 2023) ------------------------ diff --git a/docs/html/user.html b/docs/html/user.html index 8fc97c5..40fa5a2 100644 --- a/docs/html/user.html +++ b/docs/html/user.html @@ -472,14 +472,14 @@

Responses

Request samples

Content type
application/json
{
  • "emails": [
    ]
}

Pending invites

Returns list of pending invites

Responses

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "results": [
    ]
}

Session

User sessions

+

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "results": [
    ]
}

Session

User sessions

Deletes all sessions for a particular user

path Parameters
id
required
integer

The id of user

Responses