From 9b79a411e0d0ecd57c52f0878d2873f925eebc4f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 24 Feb 2019 12:53:22 +0900 Subject: Use camelCase --- src/server/api/endpoints/drive/files/show.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/api/endpoints/drive') diff --git a/src/server/api/endpoints/drive/files/show.ts b/src/server/api/endpoints/drive/files/show.ts index c2442c65c4..6d63a8605c 100644 --- a/src/server/api/endpoints/drive/files/show.ts +++ b/src/server/api/endpoints/drive/files/show.ts @@ -73,12 +73,12 @@ export default define(meta, async (ps, user) => { 'metadata.deletedAt': { $exists: false } }); } else if (ps.url) { - const isInternalStorageUrl = ps.url.startsWith(config.drive_url); + const isInternalStorageUrl = ps.url.startsWith(config.driveUrl); if (isInternalStorageUrl) { // Extract file ID from url // e.g. // http://misskey.local/files/foo?original=bar --> foo - const fileId = new mongo.ObjectID(ps.url.replace(config.drive_url, '').replace(/\?(.*)$/, '').replace(/\//g, '')); + const fileId = new mongo.ObjectID(ps.url.replace(config.driveUrl, '').replace(/\?(.*)$/, '').replace(/\//g, '')); file = await DriveFile.findOne({ _id: fileId, 'metadata.deletedAt': { $exists: false } -- cgit v1.2.3-freya