@hieuzest/koishi-plugin-mahjongpub 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +4 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1123,13 +1123,14 @@ var ConsoleExtension = class {
1123
1123
  addListener("mahjongpub/list-teams", async function(cid) {
1124
1124
  const managed = (await getUserContests(this)).find((c) => c.cid === cid);
1125
1125
  if (!managed?.adminPassword) throw new Error("Admin password not configured");
1126
+ const pubTeams = await that.mahjongpub.getTeams(cid);
1126
1127
  const contestAdmin = new ContestAdmin(that.ctx, cid, managed.adminPassword, { endpoint: that.config.endpoint });
1127
1128
  await contestAdmin.read(true);
1128
- return Object.values(contestAdmin.teams).map((t) => ({
1129
+ return Object.values(pubTeams).map((t) => ({
1129
1130
  tid: t.tid,
1130
- name: t.name,
1131
+ name: t.t_name,
1131
1132
  players: t.players,
1132
- pw: t.pw
1133
+ pw: contestAdmin.teams[t.tid]?.pw
1133
1134
  }));
1134
1135
  }, { authority: 3 });
1135
1136
  addListener("mahjongpub/update-team-players", async function(cid, tid, players) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hieuzest/koishi-plugin-mahjongpub",
3
3
  "description": "Mahjong.pub API",
4
- "version": "0.3.2",
4
+ "version": "0.3.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [