Skip to content

Commit 18a8a8c

Browse files
committed
update docs, include membersVisible in json
1 parent 5adf09a commit 18a8a8c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/docs/player-group-api.docs.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import APIDocs from './api-docs'
44
const PlayerGroupAPIDocs: APIDocs<PlayerGroupAPIService> = {
55
get: {
66
description: 'Get a group and its members',
7+
params: {
8+
route: {
9+
id: 'The ID of the group'
10+
}
11+
},
712
samples: [
813
{
914
title: 'Sample response (members visible)',
@@ -24,6 +29,7 @@ const PlayerGroupAPIDocs: APIDocs<PlayerGroupAPIService> = {
2429
}
2530
],
2631
ruleMode: '$and',
32+
membersVisible: true,
2733
updatedAt: '2024-10-01T23:09:18.000Z',
2834
count: 1,
2935
members: [
@@ -69,6 +75,7 @@ const PlayerGroupAPIDocs: APIDocs<PlayerGroupAPIService> = {
6975
}
7076
],
7177
ruleMode: '$and',
78+
membersVisible: false,
7279
updatedAt: '2024-10-01T23:09:18.000Z',
7380
count: 1
7481
}

src/entities/player-group.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default class PlayerGroup {
107107
description: this.description,
108108
rules: this.rules,
109109
ruleMode: this.ruleMode,
110+
membersVisible: this.membersVisible,
110111
updatedAt: this.updatedAt
111112
}
112113
}

src/services/player-group.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default class PlayerGroupService extends Service {
128128
return {
129129
status: 200,
130130
body: {
131-
group
131+
group: await group.toJSONWithCount()
132132
}
133133
}
134134
}

0 commit comments

Comments
 (0)