Use camelCase
This commit is contained in:
parent
b8e0ec9edc
commit
9b79a411e0
16 changed files with 34 additions and 42 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue