mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
* invite codes refactor typo * lint fixes * remove duplicate initeCodes on User * fix typo * clean permissionMiddleware * dummy permissions * separate validateInviteCode call * permissions group & user * test validateInviteCode + adjustments * more validateInviteCode fixes * missing test * generatePersonalInviteCode * generateGroupInviteCode * old tests * lint fixes * more lint fixes * fix validateInviteCode * fix redeemInviteCode, fix signup * fix all tests * fix lint * uniform types in config * test & fix invalidateInviteCode * cleanup test * fix & test redeemInviteCode * permissions * fix Group->inviteCodes * more cleanup * improve tests * fix code generation * cleanup * order inviteCodes result on User and Group * lint * test max invite codes + fix * better description of collision * tests: properly define group ids * reused old group query * reuse old Groupmembers query * remove duplicate skip * update comment * fix uniqueInviteCode * fix test
37 lines
622 B
TypeScript
37 lines
622 B
TypeScript
import gql from 'graphql-tag'
|
|
|
|
export const generatePersonalInviteCode = gql`
|
|
mutation generatePersonalInviteCode($expiresAt: String, $comment: String) {
|
|
generatePersonalInviteCode(expiresAt: $expiresAt, comment: $comment) {
|
|
code
|
|
createdAt
|
|
generatedBy {
|
|
id
|
|
name
|
|
avatar {
|
|
url
|
|
}
|
|
}
|
|
redeemedBy {
|
|
id
|
|
name
|
|
avatar {
|
|
url
|
|
}
|
|
}
|
|
expiresAt
|
|
comment
|
|
invitedTo {
|
|
id
|
|
groupType
|
|
name
|
|
about
|
|
avatar {
|
|
url
|
|
}
|
|
}
|
|
isValid
|
|
}
|
|
}
|
|
`
|