Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit c748b15

Browse files
authored
fix: replace express.Router references with nodecg.Router (#423)
1 parent 07a0a1a commit c748b15

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

services/nodecg-io-googleapis/extension/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Result, emptySuccess, success, error, ServiceBundle, Logger } from "nod
33
import { google, GoogleApis } from "googleapis";
44
import type { Credentials } from "google-auth-library/build/src/auth/credentials";
55
import type { OAuth2Client } from "google-auth-library/build/src/auth/oauth2client";
6-
import * as express from "express";
76
import opn = require("open");
87

98
interface GoogleApisServiceConfig {
@@ -49,7 +48,7 @@ class GoogleApisService extends ServiceBundle<GoogleApisServiceConfig, GoogleApi
4948
});
5049

5150
return new Promise((resolve, reject) => {
52-
const router = express.Router();
51+
const router = this.nodecg.Router();
5352

5453
router.get("/nodecg-io-googleapis/oauth2callback", async (req, res) => {
5554
try {

services/nodecg-io-googleapis/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
},
3939
"dependencies": {
4040
"@types/gapi": "^0.0.41",
41-
"express": "^4.17.2",
4241
"googleapis": "^92.0.0",
4342
"nodecg-io-core": "^0.3.0",
4443
"open": "^8.4.0"

services/nodecg-io-spotify/extension/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { NodeCG } from "nodecg-types/types/server";
22
import { Result, emptySuccess, success, error, ServiceBundle, Logger } from "nodecg-io-core";
3-
import * as express from "express";
4-
import { Router } from "express";
53
import SpotifyWebApi = require("spotify-web-api-node");
64
import open = require("open");
75

@@ -77,7 +75,7 @@ class SpotifyService extends ServiceBundle<SpotifyServiceConfig, SpotifyServiceC
7775

7876
private mountCallBackURL(spotifyApi: SpotifyWebApi, logger: Logger) {
7977
return new Promise((resolve) => {
80-
const router: Router = express.Router();
78+
const router = this.nodecg.Router();
8179

8280
router.get(callbackEndpoint, (req, res) => {
8381
// Get auth code with is returned as url query parameter if everything was successful

services/nodecg-io-spotify/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
},
3939
"dependencies": {
4040
"@types/spotify-web-api-node": "^5.0.3",
41-
"express": "^4.17.2",
4241
"nodecg-io-core": "^0.3.0",
4342
"open": "^8.4.0",
4443
"spotify-web-api-node": "^5.0.2"

0 commit comments

Comments
 (0)