karin-plugin-teamspeak 1.5.2 → 1.5.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/apps/ts3.js +8 -2
  2. package/package.json +1 -1
package/lib/apps/ts3.js CHANGED
@@ -196,6 +196,12 @@ router.get("/getAllUserList", async (req, res) => {
196
196
  const result = await getAllUserList();
197
197
  res.send(result);
198
198
  });
199
- app.use("/ts3Api", router);
200
- app.use(express.static(dirPath + "/resources/static"));
199
+ //将路由挂载到express实例中
200
+ app.use("/api/teamspeak", router);
201
+ //将静态资源挂载到express实例中 - 供外部单页应用网页部署时使用
202
+ app.use("/teamspeak", express.static(dirPath + "/resources/static"));
203
+ //供外部单页应用网页部署时使用 可用 ip:port/ts3 访问部署的网页
204
+ app.get("/teamspeak", (req, res) => {
205
+ res.sendFile(dirPath + "/resources/static/index.html");
206
+ });
201
207
  export default teamspeak3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karin-plugin-teamspeak",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "karin 的 teamspeak 插件",
5
5
  "homepage": "https://github.com/jacksixth/karin-plugin-teamspeak3",
6
6
  "bugs": {