Skip to content

Commit

Permalink
fix(s3): Delint the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneRifle committed Jun 9, 2020
1 parent 3c1361b commit 95feb2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ export const sessionSettings: SessionSettings = {
}

// LocalStack variables.
export const bucketEndpoint = process.env.BUCKET_ENDPOINT || 'http://localstack:4566'
export const accessEndpoint = process.env.ACCESS_ENDPOINT || 'http://localhost:4566'
export const bucketEndpoint =
process.env.BUCKET_ENDPOINT || 'http://localstack:4566'
export const accessEndpoint =
process.env.ACCESS_ENDPOINT || 'http://localhost:4566'

export const sentryDns: string | undefined = process.env.SENTRY_DNS
8 changes: 5 additions & 3 deletions src/server/util/aws.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AWSError, S3 } from 'aws-sdk'
import { PromiseResult } from 'aws-sdk/lib/request'
import { injectable, inject } from 'inversify'
import DependencyIds from '../constants'
import { inject, injectable } from 'inversify'
import { DependencyIds } from '../constants'

// Enums for S3 object ACL toggling. Do not change string representations.
export enum FileVisibility {
Expand All @@ -28,13 +28,15 @@ export interface S3Interface {
["setS3ObjectACL", "uploadFileToS3", "buildFileLongUrl", "getKeyFromLongUrl"] }] */
export class S3ServerSide implements S3Interface {
private s3Client: S3

private s3Bucket: string

private fileURLPrefix: string

constructor(
@inject(DependencyIds.s3Client) s3Client: S3,
@inject(DependencyIds.s3Bucket) s3Bucket: string,
@inject(DependencyIds.fileURLPrefix) fileURLPrefix: string
@inject(DependencyIds.fileURLPrefix) fileURLPrefix: string,
) {
this.s3Client = s3Client
this.s3Bucket = s3Bucket
Expand Down

0 comments on commit 95feb2a

Please sign in to comment.