mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-03-01 12:44:37 +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
24 lines
569 B
TypeScript
24 lines
569 B
TypeScript
export default {
|
|
code: { type: 'string', primary: true },
|
|
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
|
|
expiresAt: { type: 'string', isoDate: true, default: null },
|
|
generated: {
|
|
type: 'relationship',
|
|
relationship: 'GENERATED',
|
|
target: 'User',
|
|
direction: 'in',
|
|
},
|
|
redeemed: {
|
|
type: 'relationship',
|
|
relationship: 'REDEEMED',
|
|
target: 'User',
|
|
direction: 'in',
|
|
},
|
|
invitesTo: {
|
|
type: 'relationship',
|
|
relationship: 'INVITES_TO',
|
|
target: 'Group',
|
|
direction: 'out',
|
|
},
|
|
}
|