-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(invitation): add route for profil send invitation to group
- Loading branch information
1 parent
64bfc70
commit d00d30a
Showing
8 changed files
with
305 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { HandlerDefinition } from '@typing'; | ||
|
||
const schema: HandlerDefinition = { | ||
path: '/profil/invitations', | ||
post: { | ||
operationId: 'postUserToGroupInvitation', | ||
tags: ['profil'], | ||
security: [{ BearerAuth: [] }], | ||
description: 'Post a new invitation from the logged user to a group', | ||
requestBody: { | ||
required: true, | ||
content: { | ||
'application/json': { | ||
schema: { | ||
type: 'object', | ||
required: ['groupId', 'instruments'], | ||
properties: { | ||
groupId: { type: 'string' }, | ||
instruments: { | ||
type: 'array', | ||
items: { $ref: '#/components/schemas/instrument' }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
responses: { | ||
201: { | ||
description: 'The invitation has been sent', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
$ref: '#/components/schemas/httpError', | ||
}, | ||
}, | ||
}, | ||
}, | ||
200: { | ||
description: 'The invitation has been updated', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
$ref: '#/components/schemas/httpError', | ||
}, | ||
}, | ||
}, | ||
}, | ||
422: { | ||
description: 'the user is already in the group', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
$ref: '#/components/schemas/httpError', | ||
}, | ||
}, | ||
}, | ||
}, | ||
404: { | ||
description: 'the group does not exist', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
$ref: '#/components/schemas/httpError', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default schema; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters