Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: remove uploader service
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Nov 9, 2021
1 parent 7a85926 commit 96af669
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 460 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.yarnpkg.com/
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ BANDWAGON_SECRET_KEY=<YOUR_BANDWAGON_SECRET_KEY>
BANDWAGON_SERVER_ID=<YOUR_BANDWAGON_SERVER_ID>
IP_STACK_ACCESS_KEY=<YOUR_IP_STACK_ACCESS_KEY>
GOOGLE_RECAPTCHA_KEY=<YOUR_GOOGLE_RECAPTCHA_KEY>
AZURE_STORAGE_CONNECTION_STRING=<YOUR_AZURE_STORAGE_CONNECTION_STRING>
JWT_SECRET_KEY=<YOUR_JWT_SECRET_KEY>
JWT_EXPIRES_TIME=<YOUR_JWT_EXPIRES_TIME>
# Only works on the development environment.
Expand Down
1 change: 0 additions & 1 deletion env/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ IP_STACK_ACCESS_KEY=<YOUR_IP_STACK_ACCESS_KEY>
JWT_SECRET_KEY=<YOUR_JWT_SECRET_KEY>
JWT_EXPIRES_TIME=<YOUR_JWT_EXPIRES_TIME>
GOOGLE_RECAPTCHA_KEY=<YOUR_GOOGLE_RECAPTCHA_KEY>
AZURE_STORAGE_CONNECTION_STRING=<YOUR_AZURE_STORAGE_CONNECTION_STRING>
NEED_SIMULATE_NETWORK_THROTTLE=<BOOLEAN>
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
},
"dependencies": {
"@alicloud/pop-core": "^1.7.9",
"@azure/storage-blob": "^12.7.0",
"@nestjs/common": "^7.6.18",
"@nestjs/config": "^0.6.3",
"@nestjs/core": "^7.6.17",
Expand Down Expand Up @@ -61,7 +60,6 @@
"request-ip": "^2.1.3",
"rxjs": "^6.6.7",
"serve-favicon": "^2.5.0",
"sharp": "^0.29.1",
"speakeasy": "^2.0.0",
"ua-parser-js": "^0.7.28",
"uuid": "^8.3.2",
Expand All @@ -78,7 +76,6 @@
"@types/bcrypt": "^5.0.0",
"@types/csurf": "^1.11.0",
"@types/express-rate-limit": "^5.1.3",
"@types/graphql-upload": "^8.0.7",
"@types/jest": "^26.0.20",
"@types/luxon": "^2.0.5",
"@types/morgan": "^1.9.2",
Expand Down
2 changes: 0 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { ConfigModule } from './config/config.module'
import { DataBaseModule } from './database/database.module'
import { GraphqlModule } from './graphql/graphqls.module'
import { AuthModule } from './auth/auth.module'
import { UploaderModule } from './uploader/uploader.module'
import { UsersModule } from './users/users.module'
import { AnnouncementsModule } from './announcements/announcements.module'
import { OpenSourcesModule } from './open-sources/open-sources.module'
Expand Down Expand Up @@ -45,7 +44,6 @@ import { WinstonLogModule } from './shared/log/log.module'
GlobalSettingModule,
PostStatisticsModule,
WinstonLogModule,
UploaderModule,
],

providers: [
Expand Down
5 changes: 0 additions & 5 deletions src/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ export class ConfigService {
return this.get('GOOGLE_RECAPTCHA_KEY')
}

public getAzureStorageConnectionString(): string {
return this.get('AZURE_STORAGE_CONNECTION_STRING')
}

private validateEnvFile(envConfig: EnvConfig): EnvConfig {
const envVarsSchema: ObjectSchema = Joi.object({
NODE_ENV: Joi.string()
Expand All @@ -93,7 +89,6 @@ export class ConfigService {
JWT_SECRET_KEY: Joi.string().required(),
JWT_EXPIRES_TIME: Joi.number().required(),
GOOGLE_RECAPTCHA_KEY: Joi.string().required(),
AZURE_STORAGE_CONNECTION_STRING: Joi.string().required(),
NEED_SIMULATE_NETWORK_THROTTLE: Joi.boolean().optional(),
})

Expand Down
4 changes: 0 additions & 4 deletions src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ export const GOOGLE_RECAPTCHA_URL = 'https://www.google.com/recaptcha/api/siteve

export const IP_STACK_URL = 'http://api.ipstack.com/'

export const AZURE_STORAGE_URL = 'https://edge.yancey.app'

export const AZURE_STORAGE_CONTAINER_NAME = 'beg'

export const SCHEMA_GQL_FILE_NAME = 'schema.gql'

export const TOTP_ENCODE = 'base32'
Expand Down
23 changes: 0 additions & 23 deletions src/shared/filters/http-exception.filter.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/shared/guard/HTTPAuth.guard.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/uploader/uploader.module.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/uploader/uploader.resolver.ts

This file was deleted.

68 changes: 0 additions & 68 deletions src/uploader/uploader.service.ts

This file was deleted.

Loading

0 comments on commit 96af669

Please sign in to comment.