mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 07:05:03 +00:00
feat: add api prefix option
This commit is contained in:
parent
899f743ed6
commit
b40ed5ce49
9 changed files with 27 additions and 22 deletions
|
@ -3,12 +3,12 @@ import { apiTokenAuthHandlers } from "../auth";
|
|||
import { initGuildsImportExportAPI } from "./importExport";
|
||||
import { initGuildsMiscAPI } from "./misc";
|
||||
|
||||
export function initGuildsAPI(app: express.Express) {
|
||||
export function initGuildsAPI(router: express.Router) {
|
||||
const guildRouter = express.Router();
|
||||
guildRouter.use(...apiTokenAuthHandlers());
|
||||
|
||||
initGuildsMiscAPI(guildRouter);
|
||||
initGuildsImportExportAPI(guildRouter);
|
||||
|
||||
app.use("/guilds", guildRouter);
|
||||
router.use("/guilds", guildRouter);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue