Use camelCase
This commit is contained in:
@ -52,6 +52,6 @@ export default define(meta, async (ps) => {
|
||||
|
||||
return {
|
||||
token: doc.token,
|
||||
url: `${config.auth_url}/${doc.token}`
|
||||
url: `${config.authUrl}/${doc.token}`
|
||||
};
|
||||
});
|
||||
|
@ -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 }
|
||||
|
Reference in New Issue
Block a user