wip
This commit is contained in:
parent
9bcec78500
commit
bbff5b0096
3 changed files with 9 additions and 5 deletions
|
@ -12,7 +12,7 @@ module.exports = {
|
||||||
'plugin:import/typescript'
|
'plugin:import/typescript'
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
'indent': ['error', 'tab', {
|
'indent': ['warn', 'tab', {
|
||||||
'SwitchCase': 1,
|
'SwitchCase': 1,
|
||||||
'MemberExpression': 'off',
|
'MemberExpression': 'off',
|
||||||
'flatTernaryExpressions': true,
|
'flatTernaryExpressions': true,
|
||||||
|
@ -29,11 +29,14 @@ module.exports = {
|
||||||
'no-multi-spaces': ['error'],
|
'no-multi-spaces': ['error'],
|
||||||
'no-var': ['error'],
|
'no-var': ['error'],
|
||||||
'prefer-arrow-callback': ['error'],
|
'prefer-arrow-callback': ['error'],
|
||||||
'no-throw-literal': ['error'],
|
'no-throw-literal': ['warn'],
|
||||||
'no-param-reassign': ['warn'],
|
'no-param-reassign': ['warn'],
|
||||||
'no-constant-condition': ['warn'],
|
'no-constant-condition': ['warn'],
|
||||||
'no-empty-pattern': ['warn'],
|
'no-empty-pattern': ['warn'],
|
||||||
|
'no-async-promise-executor': ['off'],
|
||||||
'@typescript-eslint/no-inferrable-types': ['warn'],
|
'@typescript-eslint/no-inferrable-types': ['warn'],
|
||||||
|
'@typescript-eslint/no-empty-function': ['off'],
|
||||||
|
'@typescript-eslint/no-non-null-assertion': ['off'],
|
||||||
'import/no-unresolved': ['off'],
|
'import/no-unresolved': ['off'],
|
||||||
'import/no-default-export': ['warn'],
|
'import/no-default-export': ['warn'],
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import Resolver from '../resolver';
|
import Resolver from '../resolver';
|
||||||
import { IObject, IQuestion, isQuestion, } from '../type';
|
import { IObject, IQuestion, isQuestion, } from '../type';
|
||||||
import { apLogger } from '../logger';
|
import { apLogger } from '../logger';
|
||||||
import { Notes, Polls } from '@/models/index';
|
import { Notes, Polls } from '@/models/index';
|
||||||
import { IPoll } from '@/models/entities/poll';
|
import { IPoll } from '@/models/entities/poll';
|
||||||
|
@ -40,7 +40,7 @@ export async function extractPollFromQuestion(source: string | IObject, resolver
|
||||||
* @param uri URI of AP Question object
|
* @param uri URI of AP Question object
|
||||||
* @returns true if updated
|
* @returns true if updated
|
||||||
*/
|
*/
|
||||||
export async function updateQuestion(value: any) {
|
export async function updateQuestion(value: string | IObject): Promise<boolean> {
|
||||||
const uri = typeof value === 'string' ? value : value.id;
|
const uri = typeof value === 'string' ? value : value.id;
|
||||||
|
|
||||||
// URIがこのサーバーを指しているならスキップ
|
// URIがこのサーバーを指しているならスキップ
|
||||||
|
|
|
@ -4,7 +4,8 @@ import { User } from '@/models/entities/user';
|
||||||
import { Notes, DriveFiles, UserProfiles } from '@/models/index';
|
import { Notes, DriveFiles, UserProfiles } from '@/models/index';
|
||||||
import { In } from 'typeorm';
|
import { In } from 'typeorm';
|
||||||
|
|
||||||
export default async function(user: User) {
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
export default async function(user: User): Promise<Feed> {
|
||||||
const author = {
|
const author = {
|
||||||
link: `${config.url}/@${user.username}`,
|
link: `${config.url}/@${user.username}`,
|
||||||
name: user.name || user.username
|
name: user.name || user.username
|
||||||
|
|
Loading…
Reference in a new issue