Skip to content

Commit

Permalink
Corrected file paths for memory and s3 storage
Browse files Browse the repository at this point in the history
  • Loading branch information
brokoli777 committed Jul 27, 2024
1 parent 27470e3 commit 574d9b4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/model/data/aws/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
// src/model/data/index.js
// src/model/data/aws/index.js

// If the environment sets an AWS Region, we'll use AWS backend
// services (S3, DynamoDB); otherwise, we'll use an in-memory db.
module.exports = process.env.AWS_REGION ? require('./aws') : require('../memory');
const logger = require('../../../logger');

logger.info(`Using ${process.env.AWS_REGION ? 'AWS' : 'in-memory'} backend for data`);

const logger = require('../../logger');
const s3Client = require('./s3Client');
const { PutObjectCommand, GetObjectCommand, DeleteObjectCommand } = require('@aws-sdk/client-s3');

Expand Down
5 changes: 5 additions & 0 deletions src/model/data/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// src/model/data/index.js

// If the environment sets an AWS Region, we'll use AWS backend
// services (S3, DynamoDB); otherwise, we'll use an in-memory db.
module.exports = process.env.AWS_REGION ? require('./aws') : require('./memory');
2 changes: 1 addition & 1 deletion src/model/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
writeFragmentData,
listFragments,
deleteFragment,
} = require('./data/aws');
} = require('./data');

class Fragment {
constructor({ id, ownerId, created, updated, type, size = 0 }) {
Expand Down

0 comments on commit 574d9b4

Please sign in to comment.