プロキシアカウントをユーザー名ではなくIDで保存するように
This commit is contained in:
@ -4,6 +4,7 @@ import { getConnection } from 'typeorm';
|
||||
import { Meta } from '../../../../models/entities/meta';
|
||||
import { insertModerationLog } from '../../../../services/insert-moderation-log';
|
||||
import { DB_MAX_NOTE_TEXT_LENGTH } from '../../../../misc/hard-limits';
|
||||
import { ID } from '../../../../misc/cafy-id';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@ -165,10 +166,10 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
proxyAccount: {
|
||||
validator: $.optional.nullable.str,
|
||||
proxyAccountId: {
|
||||
validator: $.optional.nullable.type(ID),
|
||||
desc: {
|
||||
'ja-JP': 'プロキシアカウントのユーザー名'
|
||||
'ja-JP': 'プロキシアカウントのID'
|
||||
}
|
||||
},
|
||||
|
||||
@ -479,8 +480,8 @@ export default define(meta, async (ps, me) => {
|
||||
set.recaptchaSecretKey = ps.recaptchaSecretKey;
|
||||
}
|
||||
|
||||
if (ps.proxyAccount !== undefined) {
|
||||
set.proxyAccount = ps.proxyAccount;
|
||||
if (ps.proxyAccountId !== undefined) {
|
||||
set.proxyAccountId = ps.proxyAccountId;
|
||||
}
|
||||
|
||||
if (ps.maintainerName !== undefined) {
|
||||
|
@ -170,7 +170,7 @@ export default define(meta, async (ps, me) => {
|
||||
response.hiddenTags = instance.hiddenTags;
|
||||
response.blockedHosts = instance.blockedHosts;
|
||||
response.recaptchaSecretKey = instance.recaptchaSecretKey;
|
||||
response.proxyAccount = instance.proxyAccount;
|
||||
response.proxyAccountId = instance.proxyAccountId;
|
||||
response.twitterConsumerKey = instance.twitterConsumerKey;
|
||||
response.twitterConsumerSecret = instance.twitterConsumerSecret;
|
||||
response.githubClientId = instance.githubClientId;
|
||||
|
Reference in New Issue
Block a user