wip
This commit is contained in:
parent
c2c03a1c65
commit
fc15249aa4
2 changed files with 8 additions and 9 deletions
|
@ -54,8 +54,7 @@ export default async (user: IUser, content: {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 投稿を作成
|
const data: any = {
|
||||||
const post = await Post.insert({
|
|
||||||
createdAt: content.createdAt,
|
createdAt: content.createdAt,
|
||||||
mediaIds: content.media ? content.media.map(file => file._id) : [],
|
mediaIds: content.media ? content.media.map(file => file._id) : [],
|
||||||
replyId: content.reply ? content.reply._id : null,
|
replyId: content.reply ? content.reply._id : null,
|
||||||
|
@ -68,14 +67,18 @@ export default async (user: IUser, content: {
|
||||||
userId: user._id,
|
userId: user._id,
|
||||||
viaMobile: content.viaMobile,
|
viaMobile: content.viaMobile,
|
||||||
geo: content.geo || null,
|
geo: content.geo || null,
|
||||||
uri: content.uri,
|
|
||||||
appId: content.app ? content.app._id : null,
|
appId: content.app ? content.app._id : null,
|
||||||
visibility: content.visibility,
|
visibility: content.visibility,
|
||||||
|
|
||||||
// 以下非正規化データ
|
// 以下非正規化データ
|
||||||
_reply: content.reply ? { userId: content.reply.userId } : null,
|
_reply: content.reply ? { userId: content.reply.userId } : null,
|
||||||
_repost: content.repost ? { userId: content.repost.userId } : null,
|
_repost: content.repost ? { userId: content.repost.userId } : null,
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (content.uri != null) data.uri = content.uri;
|
||||||
|
|
||||||
|
// 投稿を作成
|
||||||
|
const post = await Post.insert(data);
|
||||||
|
|
||||||
res(post);
|
res(post);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import ElementLocaleJa from 'element-ui/lib/locale/lang/ja';
|
||||||
import App from './app.vue';
|
import App from './app.vue';
|
||||||
import checkForUpdate from './common/scripts/check-for-update';
|
import checkForUpdate from './common/scripts/check-for-update';
|
||||||
import MiOS, { API } from './common/mios';
|
import MiOS, { API } from './common/mios';
|
||||||
import { version, codename, hostname, lang } from './config';
|
import { version, codename, lang } from './config';
|
||||||
|
|
||||||
let elementLocale;
|
let elementLocale;
|
||||||
switch (lang) {
|
switch (lang) {
|
||||||
|
@ -60,10 +60,6 @@ console.info(
|
||||||
window.clearTimeout((window as any).mkBootTimer);
|
window.clearTimeout((window as any).mkBootTimer);
|
||||||
delete (window as any).mkBootTimer;
|
delete (window as any).mkBootTimer;
|
||||||
|
|
||||||
if (hostname != 'localhost') {
|
|
||||||
document.domain = hostname;
|
|
||||||
}
|
|
||||||
|
|
||||||
//#region Set lang attr
|
//#region Set lang attr
|
||||||
const html = document.documentElement;
|
const html = document.documentElement;
|
||||||
html.setAttribute('lang', lang);
|
html.setAttribute('lang', lang);
|
||||||
|
|
Loading…
Reference in a new issue