diff --git a/docs/2_development.md b/docs/2_development.md index 22041ac..2b0e88c 100644 --- a/docs/2_development.md +++ b/docs/2_development.md @@ -145,9 +145,6 @@ The required fields are: be the server-side key created in [setup](1_setup.md) in GCP [Credentials](https://console.cloud.google.com/apis/credentials) - `cloudProjectId`: Your Google Cloud project ID - -The optional fields are: - - `twitterApiCredentials`: Your credentials for the Twitter APIs. All together, your config should look something like one of the two configs diff --git a/src/server/middleware/twitter.middleware.ts b/src/server/middleware/twitter.middleware.ts index 207fbf3..55bf015 100644 --- a/src/server/middleware/twitter.middleware.ts +++ b/src/server/middleware/twitter.middleware.ts @@ -298,8 +298,8 @@ function loadTwitterData( } const auth: AxiosBasicCredentials = { - username: credentials!.username, - password: credentials!.password, + username: credentials.username!, + password: credentials.password!, }; return axios diff --git a/src/server/serving.ts b/src/server/serving.ts index dda51fb..0961957 100644 --- a/src/server/serving.ts +++ b/src/server/serving.ts @@ -72,12 +72,17 @@ export interface Config { } export interface TwitterApiCredentials { - accountName: string; + // The below three fields are necessary if using Enterprise Full-Archive + // Search. + accountName?: string; + password?: string; + username?: string; + // The below two fields are necessary for the Blocks, Mutes, and Hide Replies + // APIs. appKey: string; appToken: string; + // Necessary if using v2 Full-Archive Search. bearerToken?: string; - password: string; - username: string; } export interface WebAppCredentials {