Merge branch 'develop'

This commit is contained in:
syuilo 2019-05-02 17:18:34 +09:00
commit 9fb7c4091f
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
7 changed files with 12 additions and 5 deletions

View file

@ -195,7 +195,7 @@ export default class MiOS extends EventEmitter {
});
} else {
// Get token from cookie or localStorage
const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1] || localStorage.getItem('i');
const i = (document.cookie.match(/i=(\w+)/) || [null, null])[1] || localStorage.getItem('i');
fetchme(i, me => {
if (me) {

View file

@ -13,7 +13,7 @@ import { ILocalUser } from '../../../models/entities/user';
import { ensure } from '../../../prelude/ensure';
function getUserToken(ctx: Koa.BaseContext) {
return ((ctx.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
return ((ctx.headers['cookie'] || '').match(/i=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext) {

View file

@ -13,7 +13,7 @@ import { ILocalUser } from '../../../models/entities/user';
import { ensure } from '../../../prelude/ensure';
function getUserToken(ctx: Koa.BaseContext) {
return ((ctx.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
return ((ctx.headers['cookie'] || '').match(/i=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext) {

View file

@ -12,7 +12,7 @@ import { ILocalUser } from '../../../models/entities/user';
import { ensure } from '../../../prelude/ensure';
function getUserToken(ctx: Koa.BaseContext) {
return ((ctx.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
return ((ctx.headers['cookie'] || '').match(/i=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext) {

View file

@ -406,6 +406,7 @@ export default async function(
file.md5 = hash;
file.name = detectedName;
file.type = mime;
file.storedInternal = false;
file = await DriveFiles.save(file);
} catch (e) {