diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 16:46:11 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 16:46:11 +0900 |
| commit | 1acc30822d869fcd4edf70fd8a8dca72f21c8730 (patch) | |
| tree | 1c452aa0bf777f1cce35b3f21535ee698d3d151e /src | |
| parent | wip (diff) | |
| download | sharkey-1acc30822d869fcd4edf70fd8a8dca72f21c8730.tar.gz sharkey-1acc30822d869fcd4edf70fd8a8dca72f21c8730.tar.bz2 sharkey-1acc30822d869fcd4edf70fd8a8dca72f21c8730.zip | |
wip
Diffstat (limited to 'src')
89 files changed, 284 insertions, 284 deletions
diff --git a/src/api/bot/core.ts b/src/api/bot/core.ts index 9e699572de..ec7c935f9e 100644 --- a/src/api/bot/core.ts +++ b/src/api/bot/core.ts @@ -297,7 +297,7 @@ class TlContext extends Context { private async getTl() { const tl = await require('../endpoints/posts/timeline')({ limit: 5, - until_id: this.next ? this.next : undefined + untilId: this.next ? this.next : undefined }, this.bot.user); if (tl.length > 0) { @@ -349,7 +349,7 @@ class NotificationsContext extends Context { private async getNotifications() { const notifications = await require('../endpoints/i/notifications')({ limit: 5, - until_id: this.next ? this.next : undefined + untilId: this.next ? this.next : undefined }, this.bot.user); if (notifications.length > 0) { diff --git a/src/api/bot/interfaces/line.ts b/src/api/bot/interfaces/line.ts index dc600125c5..296b42a284 100644 --- a/src/api/bot/interfaces/line.ts +++ b/src/api/bot/interfaces/line.ts @@ -130,7 +130,7 @@ class LineBot extends BotCore { altText: await super.showUserCommand(q), template: { type: 'buttons', - thumbnailImageUrl: `${user.avatar_url}?thumbnail&size=1024`, + thumbnailImageUrl: `${user.avatarUrl}?thumbnail&size=1024`, title: `${user.name} (@${acct})`, text: user.description || '(no description)', actions: actions diff --git a/src/api/endpoints.ts b/src/api/endpoints.ts index c7100bd036..979d8ac295 100644 --- a/src/api/endpoints.ts +++ b/src/api/endpoints.ts @@ -289,7 +289,7 @@ const endpoints: Endpoint[] = [ kind: 'notification-write' }, { - name: 'notifications/mark_as_read_all', + name: 'notifications/markAsRead_all', withCredential: true, kind: 'notification-write' }, diff --git a/src/api/endpoints/app/create.ts b/src/api/endpoints/app/create.ts index cde4846e0f..713078463d 100644 --- a/src/api/endpoints/app/create.ts +++ b/src/api/endpoints/app/create.ts @@ -40,7 +40,7 @@ import App, { isValidNameId, pack } from '../../models/app'; * type: string * collectionFormat: csv * - - * name: callback_url + * name: callbackUrl * description: URL called back after authentication * in: formData * required: false @@ -82,10 +82,10 @@ module.exports = async (params, user) => new Promise(async (res, rej) => { const [permission, permissionErr] = $(params.permission).array('string').unique().$; if (permissionErr) return rej('invalid permission param'); - // Get 'callback_url' parameter + // Get 'callbackUrl' parameter // TODO: Check it is valid url - const [callbackUrl = null, callbackUrlErr] = $(params.callback_url).optional.nullable.string().$; - if (callbackUrlErr) return rej('invalid callback_url param'); + const [callbackUrl = null, callbackUrlErr] = $(params.callbackUrl).optional.nullable.string().$; + if (callbackUrlErr) return rej('invalid callbackUrl param'); // Generate secret const secret = rndstr('a-zA-Z0-9', 32); @@ -99,7 +99,7 @@ module.exports = async (params, user) => new Promise(async (res, rej) => { nameIdLower: nameId.toLowerCase(), description: description, permission: permission, - callback_url: callbackUrl, + callbackUrl: callbackUrl, secret: secret }); diff --git a/src/api/endpoints/auth/session/generate.ts b/src/api/endpoints/auth/session/generate.ts index 81db188ee5..a087b46d82 100644 --- a/src/api/endpoints/auth/session/generate.ts +++ b/src/api/endpoints/auth/session/generate.ts @@ -14,7 +14,7 @@ import config from '../../../../conf'; * summary: Generate a session * parameters: * - - * name: app_secret + * name: appSecret * description: App Secret * in: formData * required: true @@ -45,9 +45,9 @@ import config from '../../../../conf'; * @return {Promise<any>} */ module.exports = (params) => new Promise(async (res, rej) => { - // Get 'app_secret' parameter - const [appSecret, appSecretErr] = $(params.app_secret).string().$; - if (appSecretErr) return rej('invalid app_secret param'); + // Get 'appSecret' parameter + const [appSecret, appSecretErr] = $(params.appSecret).string().$; + if (appSecretErr) return rej('invalid appSecret param'); // Lookup app const app = await App.findOne({ diff --git a/src/api/endpoints/auth/session/userkey.ts b/src/api/endpoints/auth/session/userkey.ts index 74f025c8a5..5d9983af67 100644 --- a/src/api/endpoints/auth/session/userkey.ts +++ b/src/api/endpoints/auth/session/userkey.ts @@ -14,7 +14,7 @@ import { pack } from '../../../models/user'; * summary: Get an access token(userkey) * parameters: * - - * name: app_secret + * name: appSecret * description: App Secret * in: formData * required: true @@ -50,9 +50,9 @@ import { pack } from '../../../models/user'; * @return {Promise<any>} */ module.exports = (params) => new Promise(async (res, rej) => { - // Get 'app_secret' parameter - const [appSecret, appSecretErr] = $(params.app_secret).string().$; - if (appSecretErr) return rej('invalid app_secret param'); + // Get 'appSecret' parameter + const [appSecret, appSecretErr] = $(params.appSecret).string().$; + if (appSecretErr) return rej('invalid appSecret param'); // Lookup app const app = await App.findOne({ diff --git a/src/api/endpoints/channels.ts b/src/api/endpoints/channels.ts index b9a7d1b788..a4acc06605 100644 --- a/src/api/endpoints/channels.ts +++ b/src/api/endpoints/channels.ts @@ -16,17 +16,17 @@ module.exports = (params, me) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } // Construct query diff --git a/src/api/endpoints/channels/posts.ts b/src/api/endpoints/channels/posts.ts index 7536664051..348dbb108b 100644 --- a/src/api/endpoints/channels/posts.ts +++ b/src/api/endpoints/channels/posts.ts @@ -17,17 +17,17 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const [limit = 1000, limitErr] = $(params.limit).optional.number().range(1, 1000).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } // Get 'channelId' parameter diff --git a/src/api/endpoints/drive/files.ts b/src/api/endpoints/drive/files.ts index 1ce855932b..f982ef62e0 100644 --- a/src/api/endpoints/drive/files.ts +++ b/src/api/endpoints/drive/files.ts @@ -17,17 +17,17 @@ module.exports = async (params, user, app) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) throw 'invalid limit param'; - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) throw 'invalid since_id param'; + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) throw 'invalid sinceId param'; - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) throw 'invalid until_id param'; + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) throw 'invalid untilId param'; - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - throw 'cannot set since_id and until_id'; + throw 'cannot set sinceId and untilId'; } // Get 'folderId' parameter diff --git a/src/api/endpoints/drive/folders.ts b/src/api/endpoints/drive/folders.ts index c259646352..c314837f72 100644 --- a/src/api/endpoints/drive/folders.ts +++ b/src/api/endpoints/drive/folders.ts @@ -17,17 +17,17 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } // Get 'folderId' parameter diff --git a/src/api/endpoints/drive/stream.ts b/src/api/endpoints/drive/stream.ts index 0f9cea9f1d..71db38f3b3 100644 --- a/src/api/endpoints/drive/stream.ts +++ b/src/api/endpoints/drive/stream.ts @@ -16,17 +16,17 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } // Get 'type' parameter diff --git a/src/api/endpoints/i/change_password.ts b/src/api/endpoints/i/change_password.ts index 88fb36b1fb..e3b0127e7d 100644 --- a/src/api/endpoints/i/change_password.ts +++ b/src/api/endpoints/i/change_password.ts @@ -13,13 +13,13 @@ import User from '../../models/user'; * @return {Promise<any>} */ module.exports = async (params, user) => new Promise(async (res, rej) => { - // Get 'current_password' parameter - const [currentPassword, currentPasswordErr] = $(params.current_password).string().$; - if (currentPasswordErr) return rej('invalid current_password param'); + // Get 'currentPasword' parameter + const [currentPassword, currentPasswordErr] = $(params.currentPasword).string().$; + if (currentPasswordErr) return rej('invalid currentPasword param'); - // Get 'new_password' parameter - const [newPassword, newPasswordErr] = $(params.new_password).string().$; - if (newPasswordErr) return rej('invalid new_password param'); + // Get 'newPassword' parameter + const [newPassword, newPasswordErr] = $(params.newPassword).string().$; + if (newPasswordErr) return rej('invalid newPassword param'); // Compare password const same = await bcrypt.compare(currentPassword, user.account.password); diff --git a/src/api/endpoints/i/notifications.ts b/src/api/endpoints/i/notifications.ts index e3447c17ec..7119bf6ea3 100644 --- a/src/api/endpoints/i/notifications.ts +++ b/src/api/endpoints/i/notifications.ts @@ -21,9 +21,9 @@ module.exports = (params, user) => new Promise(async (res, rej) => { $(params.following).optional.boolean().$; if (followingError) return rej('invalid following param'); - // Get 'mark_as_read' parameter - const [markAsRead = true, markAsReadErr] = $(params.mark_as_read).optional.boolean().$; - if (markAsReadErr) return rej('invalid mark_as_read param'); + // Get 'markAsRead' parameter + const [markAsRead = true, markAsReadErr] = $(params.markAsRead).optional.boolean().$; + if (markAsReadErr) return rej('invalid markAsRead param'); // Get 'type' parameter const [type, typeErr] = $(params.type).optional.array('string').unique().$; @@ -33,17 +33,17 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } const mute = await Mute.find({ diff --git a/src/api/endpoints/i/signin_history.ts b/src/api/endpoints/i/signin_history.ts index 5b794d0a4b..a4ba22790c 100644 --- a/src/api/endpoints/i/signin_history.ts +++ b/src/api/endpoints/i/signin_history.ts @@ -16,17 +16,17 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } const query = { diff --git a/src/api/endpoints/i/update.ts b/src/api/endpoints/i/update.ts index 6645751871..45dfddcfe7 100644 --- a/src/api/endpoints/i/update.ts +++ b/src/api/endpoints/i/update.ts @@ -51,10 +51,10 @@ module.exports = async (params, user, _, isSecure) => new Promise(async (res, re if (isBotErr) return rej('invalid isBot param'); if (isBot != null) user.account.isBot = isBot; - // Get 'auto_watch' parameter - const [autoWatch, autoWatchErr] = $(params.auto_watch).optional.boolean().$; - if (autoWatchErr) return rej('invalid auto_watch param'); - if (autoWatch != null) user.account.settings.auto_watch = autoWatch; + // Get 'autoWatch' parameter + const [autoWatch, autoWatchErr] = $(params.autoWatch).optional.boolean().$; + if (autoWatchErr) return rej('invalid autoWatch param'); + if (autoWatch != null) user.account.settings.autoWatch = autoWatch; await User.update(user._id, { $set: { diff --git a/src/api/endpoints/messaging/messages.ts b/src/api/endpoints/messaging/messages.ts index ba8ca7d1c2..dd80e41d03 100644 --- a/src/api/endpoints/messaging/messages.ts +++ b/src/api/endpoints/messaging/messages.ts @@ -32,25 +32,25 @@ module.exports = (params, user) => new Promise(async (res, rej) => { return rej('user not found'); } - // Get 'mark_as_read' parameter - const [markAsRead = true, markAsReadErr] = $(params.mark_as_read).optional.boolean().$; - if (markAsReadErr) return rej('invalid mark_as_read param'); + // Get 'markAsRead' parameter + const [markAsRead = true, markAsReadErr] = $(params.markAsRead).optional.boolean().$; + if (markAsReadErr) return rej('invalid markAsRead param'); // Get 'limit' parameter const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } const query = { diff --git a/src/api/endpoints/othello/games.ts b/src/api/endpoints/othello/games.ts index 5c71f98828..37fa384189 100644 --- a/src/api/endpoints/othello/games.ts +++ b/src/api/endpoints/othello/games.ts @@ -10,17 +10,17 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } const q: any = my ? { diff --git a/src/api/endpoints/posts.ts b/src/api/endpoints/posts.ts index 7e9ff3ad74..bee1de02d4 100644 --- a/src/api/endpoints/posts.ts +++ b/src/api/endpoints/posts.ts @@ -35,17 +35,17 @@ module.exports = (params) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } // Construct query diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts index 2a3d974fe8..b99d1fbbc1 100644 --- a/src/api/endpoints/posts/create.ts +++ b/src/api/endpoints/posts/create.ts @@ -392,7 +392,7 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => { }); // この投稿をWatchする - if ((user.account as ILocalAccount).settings.auto_watch !== false) { + if ((user.account as ILocalAccount).settings.autoWatch !== false) { watch(user._id, reply); } diff --git a/src/api/endpoints/posts/mentions.ts b/src/api/endpoints/posts/mentions.ts index da90583bbd..1b342e8de9 100644 --- a/src/api/endpoints/posts/mentions.ts +++ b/src/api/endpoints/posts/mentions.ts @@ -23,17 +23,17 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } // Construct query diff --git a/src/api/endpoints/posts/polls/vote.ts b/src/api/endpoints/posts/polls/vote.ts index e87474ae6e..734a3a3c45 100644 --- a/src/api/endpoints/posts/polls/vote.ts +++ b/src/api/endpoints/posts/polls/vote.ts @@ -100,7 +100,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { }); // この投稿をWatchする - if (user.account.settings.auto_watch !== false) { + if (user.account.settings.autoWatch !== false) { watch(user._id, post); } }); diff --git a/src/api/endpoints/posts/reactions/create.ts b/src/api/endpoints/posts/reactions/create.ts index 7031d28e56..6f75a923cd 100644 --- a/src/api/endpoints/posts/reactions/create.ts +++ b/src/api/endpoints/posts/reactions/create.ts @@ -116,7 +116,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { }); // この投稿をWatchする - if (user.account.settings.auto_watch !== false) { + if (user.account.settings.autoWatch !== false) { watch(user._id, post); } }); diff --git a/src/api/endpoints/posts/reposts.ts b/src/api/endpoints/posts/reposts.ts index c1645117f0..51af41f523 100644 --- a/src/api/endpoints/posts/reposts.ts +++ b/src/api/endpoints/posts/reposts.ts @@ -20,17 +20,17 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Check if both of since_id and until_id is specified + // Check if both of sinceId and untilId is specified if (sinceId && untilId) { - return rej('cannot set since_id and until_id'); + return rej('cannot set sinceId and untilId'); } // Lookup post diff --git a/src/api/endpoints/posts/search.ts b/src/api/endpoints/posts/search.ts index e7906c95c8..f90b9aa0dd 100644 --- a/src/api/endpoints/posts/search.ts +++ b/src/api/endpoints/posts/search.ts @@ -61,13 +61,13 @@ module.exports = (params, me) => new Promise(async (res, rej) => { const [poll = null, pollErr] = $(params.poll).optional.nullable.boolean().$; if (pollErr) return rej('invalid poll param'); - // Get 'since_date' parameter - const [sinceDate, sinceDateErr] = $(params.since_date).optional.number().$; - if (sinceDateErr) throw 'invalid since_date param'; + // Get 'sinceDate' parameter + const [sinceDate, sinceDateErr] = $(params.sinceDate).optional.number().$; + if (sinceDateErr) throw 'invalid sinceDate param'; - // Get 'until_date' parameter - const [untilDate, untilDateErr] = $(params.until_date).optional.number().$; - if (untilDateErr) throw 'invalid until_date param'; + // Get 'untilDate' parameter + const [untilDate, untilDateErr] = $(params.untilDate).optional.number().$; + if (untilDateErr) throw 'invalid untilDate param'; // Get 'offset' parameter const [offset = 0, offsetErr] = $(params.offset).optional.number().min(0).$; diff --git a/src/api/endpoints/posts/timeline.ts b/src/api/endpoints/posts/timeline.ts index c7cb8032e3..a3e915f16a 100644 --- a/src/api/endpoints/posts/timeline.ts +++ b/src/api/endpoints/posts/timeline.ts @@ -22,25 +22,25 @@ module.exports = async (params, user, app) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) throw 'invalid limit param'; - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) throw 'invalid since_id param'; + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) throw 'invalid sinceId param'; - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) throw 'invalid until_id param'; + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) throw 'invalid untilId param'; - // Get 'since_date' parameter - const [sinceDate, sinceDateErr] = $(params.since_date).optional.number().$; - if (sinceDateErr) throw 'invalid since_date param'; + // Get 'sinceDate' parameter + const [sinceDate, sinceDateErr] = $(params.sinceDate).optional.number().$; + if (sinceDateErr) throw 'invalid sinceDate param'; - // Get 'until_date' parameter - const [untilDate, untilDateErr] = $(params.until_date).optional.number().$; - if (untilDateErr) throw 'invalid until_date param'; + // Get 'untilDate' parameter + const [untilDate, untilDateErr] = $(params.untilDate).optional.number().$; + if (untilDateErr) throw 'invalid untilDate param'; - // Check if only one of since_id, until_id, since_date, until_date specified + // Check if only one of sinceId, untilId, sinceDate, untilDate specified if ([sinceId, untilId, sinceDate, untilDate].filter(x => x != null).length > 1) { - throw 'only one of since_id, until_id, since_date, until_date can be specified'; + throw 'only one of sinceId, untilId, sinceDate, untilDate can be specified'; } const { followingIds, watchingChannelIds, mutedUserIds } = await rap({ diff --git a/src/api/endpoints/users/posts.ts b/src/api/endpoints/users/posts.ts index f08be91c4d..9ece429b60 100644 --- a/src/api/endpoints/users/posts.ts +++ b/src/api/endpoints/users/posts.ts @@ -46,25 +46,25 @@ module.exports = (params, me) => new Promise(async (res, rej) => { const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); - // Get 'since_id' parameter - const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$; - if (sinceIdErr) return rej('invalid since_id param'); + // Get 'sinceId' parameter + const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$; + if (sinceIdErr) return rej('invalid sinceId param'); - // Get 'until_id' parameter - const [untilId, untilIdErr] = $(params.until_id).optional.id().$; - if (untilIdErr) return rej('invalid until_id param'); + // Get 'untilId' parameter + const [untilId, untilIdErr] = $(params.untilId).optional.id().$; + if (untilIdErr) return rej('invalid untilId param'); - // Get 'since_date' parameter - const [sinceDate, sinceDateErr] = $(params.since_date).optional.number().$; - if (sinceDateErr) throw 'invalid since_date param'; + // Get 'sinceDate' parameter + const [sinceDate, sinceDateErr] = $(params.sinceDate).optional.number().$; + if (sinceDateErr) throw 'invalid sinceDate param'; - // Get 'until_date' parameter - const [untilDate, untilDateErr] = $(params.until_date).optional.number().$; - if (untilDateErr) throw 'invalid until_date param'; + // Get 'untilDate' parameter + const [untilDate, untilDateErr] = $(params.untilDate).optional.number().$; + if (untilDateErr) throw 'invalid untilDate param'; - // Check if only one of since_id, until_id, since_date, until_date specified + // Check if only one of sinceId, untilId, sinceDate, untilDate specified if ([sinceId, untilId, sinceDate, untilDate].filter(x => x != null).length > 1) { - throw 'only one of since_id, until_id, since_date, until_date can be specified'; + throw 'only one of sinceId, untilId, sinceDate, untilDate can be specified'; } const q = userId !== undefined diff --git a/src/api/models/user.ts b/src/api/models/user.ts index 8c68b06dfa..9ee413e0d8 100644 --- a/src/api/models/user.ts +++ b/src/api/models/user.ts @@ -195,11 +195,11 @@ export const pack = ( } } - _user.avatar_url = _user.avatarId != null + _user.avatarUrl = _user.avatarId != null ? `${config.drive_url}/${_user.avatarId}` : `${config.drive_url}/default-avatar.jpg`; - _user.banner_url = _user.bannerId != null + _user.bannerUrl = _user.bannerId != null ? `${config.drive_url}/${_user.bannerId}` : null; diff --git a/src/api/private/signup.ts b/src/api/private/signup.ts index 1304ccb54c..9178c0eb89 100644 --- a/src/api/private/signup.ts +++ b/src/api/private/signup.ts @@ -137,7 +137,7 @@ export default async (req: express.Request, res: express.Response) => { weight: null }, settings: { - auto_watch: true + autoWatch: true }, clientSettings: { home: homeData diff --git a/src/web/app/auth/views/index.vue b/src/web/app/auth/views/index.vue index 17e5cc6108..690cc4f28e 100644 --- a/src/web/app/auth/views/index.vue +++ b/src/web/app/auth/views/index.vue @@ -15,8 +15,8 @@ </div> <div class="accepted" v-if="state == 'accepted'"> <h1>{{ session.app.is_authorized ? 'このアプリは既に連携済みです' : 'アプリケーションの連携を許可しました'}}</h1> - <p v-if="session.app.callback_url">アプリケーションに戻っています<mk-ellipsis/></p> - <p v-if="!session.app.callback_url">アプリケーションに戻って、やっていってください。</p> + <p v-if="session.app.callbackUrl">アプリケーションに戻っています<mk-ellipsis/></p> + <p v-if="!session.app.callbackUrl">アプリケーションに戻って、やっていってください。</p> </div> <div class="error" v-if="state == 'fetch-session-error'"> <p>セッションが存在しません。</p> @@ -77,8 +77,8 @@ export default Vue.extend({ methods: { accepted() { this.state = 'accepted'; - if (this.session.app.callback_url) { - location.href = this.session.app.callback_url + '?token=' + this.session.token; + if (this.session.app.callbackUrl) { + location.href = this.session.app.callbackUrl + '?token=' + this.session.token; } } } diff --git a/src/web/app/common/scripts/compose-notification.ts b/src/web/app/common/scripts/compose-notification.ts index e1dbd3bc13..273579cbc6 100644 --- a/src/web/app/common/scripts/compose-notification.ts +++ b/src/web/app/common/scripts/compose-notification.ts @@ -23,42 +23,42 @@ export default function(type, data): Notification { return { title: `${data.user.name}さんから:`, body: getPostSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' + icon: data.user.avatarUrl + '?thumbnail&size=64' }; case 'reply': return { title: `${data.user.name}さんから返信:`, body: getPostSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' + icon: data.user.avatarUrl + '?thumbnail&size=64' }; case 'quote': return { title: `${data.user.name}さんが引用:`, body: getPostSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' + icon: data.user.avatarUrl + '?thumbnail&size=64' }; case 'reaction': return { title: `${data.user.name}: ${getReactionEmoji(data.reaction)}:`, body: getPostSummary(data.post), - icon: data.user.avatar_url + '?thumbnail&size=64' + icon: data.user.avatarUrl + '?thumbnail&size=64' }; case 'unread_messaging_message': return { title: `${data.user.name}さんからメッセージ:`, body: data.text, // TODO: getMessagingMessageSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' + icon: data.user.avatarUrl + '?thumbnail&size=64' }; case 'othello_invited': return { title: '対局への招待があります', body: `${data.parent.name}さんから`, - icon: data.parent.avatar_url + '?thumbnail&size=64' + icon: data.parent.avatarUrl + '?thumbnail&size=64' }; default: diff --git a/src/web/app/common/views/components/autocomplete.vue b/src/web/app/common/views/components/autocomplete.vue index 8afa291e3c..79bd2ba023 100644 --- a/src/web/app/common/views/components/autocomplete.vue +++ b/src/web/app/common/views/components/autocomplete.vue @@ -2,7 +2,7 @@ <div class="mk-autocomplete" @contextmenu.prevent="() => {}"> <ol class="users" ref="suggests" v-if="users.length > 0"> <li v-for="user in users" @click="complete(type, user)" @keydown="onKeydown" tabindex="-1"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=32`" alt=""/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=32`" alt=""/> <span class="name">{{ user.name }}</span> <span class="username">@{{ getAcct(user) }}</span> </li> diff --git a/src/web/app/common/views/components/messaging-room.message.vue b/src/web/app/common/views/components/messaging-room.message.vue index d21cce1a0a..8d35b50391 100644 --- a/src/web/app/common/views/components/messaging-room.message.vue +++ b/src/web/app/common/views/components/messaging-room.message.vue @@ -1,7 +1,7 @@ <template> <div class="message" :data-is-me="isMe"> <router-link class="avatar-anchor" :to="`/@${acct}`" :title="acct" target="_blank"> - <img class="avatar" :src="`${message.user.avatar_url}?thumbnail&size=80`" alt=""/> + <img class="avatar" :src="`${message.user.avatarUrl}?thumbnail&size=80`" alt=""/> </router-link> <div class="content"> <div class="balloon" :data-no-text="message.text == null"> diff --git a/src/web/app/common/views/components/messaging-room.vue b/src/web/app/common/views/components/messaging-room.vue index 36c53fd3fe..d30c64d74a 100644 --- a/src/web/app/common/views/components/messaging-room.vue +++ b/src/web/app/common/views/components/messaging-room.vue @@ -125,7 +125,7 @@ export default Vue.extend({ (this as any).api('messaging/messages', { userId: this.user.id, limit: max + 1, - until_id: this.existMoreMessages ? this.messages[0].id : undefined + untilId: this.existMoreMessages ? this.messages[0].id : undefined }).then(messages => { if (messages.length == max + 1) { this.existMoreMessages = true; diff --git a/src/web/app/common/views/components/messaging.vue b/src/web/app/common/views/components/messaging.vue index 0272c67073..8317c3738a 100644 --- a/src/web/app/common/views/components/messaging.vue +++ b/src/web/app/common/views/components/messaging.vue @@ -13,7 +13,7 @@ @click="navigate(user)" tabindex="-1" > - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=32`" alt=""/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=32`" alt=""/> <span class="name">{{ user.name }}</span> <span class="username">@{{ getAcct(user) }}</span> </li> @@ -31,7 +31,7 @@ :key="message.id" > <div> - <img class="avatar" :src="`${isMe(message) ? message.recipient.avatar_url : message.user.avatar_url}?thumbnail&size=64`" alt=""/> + <img class="avatar" :src="`${isMe(message) ? message.recipient.avatarUrl : message.user.avatarUrl}?thumbnail&size=64`" alt=""/> <header> <span class="name">{{ isMe(message) ? message.recipient.name : message.user.name }}</span> <span class="username">@{{ getAcct(isMe(message) ? message.recipient : message.user) }}</span> diff --git a/src/web/app/common/views/components/othello.game.vue b/src/web/app/common/views/components/othello.game.vue index 8150fe07f0..f08742ad10 100644 --- a/src/web/app/common/views/components/othello.game.vue +++ b/src/web/app/common/views/components/othello.game.vue @@ -19,8 +19,8 @@ @click="set(i)" :title="'[' + (o.transformPosToXy(i)[0] + 1) + ', ' + (o.transformPosToXy(i)[1] + 1) + '] (' + i + ')'" > - <img v-if="stone === true" :src="`${blackUser.avatar_url}?thumbnail&size=128`" alt=""> - <img v-if="stone === false" :src="`${whiteUser.avatar_url}?thumbnail&size=128`" alt=""> + <img v-if="stone === true" :src="`${blackUser.avatarUrl}?thumbnail&size=128`" alt=""> + <img v-if="stone === false" :src="`${whiteUser.avatarUrl}?thumbnail&size=128`" alt=""> </div> </div> diff --git a/src/web/app/common/views/components/othello.vue b/src/web/app/common/views/components/othello.vue index 7bdb471005..7737d74ded 100644 --- a/src/web/app/common/views/components/othello.vue +++ b/src/web/app/common/views/components/othello.vue @@ -31,7 +31,7 @@ <section v-if="invitations.length > 0"> <h2>対局の招待があります!:</h2> <div class="invitation" v-for="i in invitations" tabindex="-1" @click="accept(i)"> - <img :src="`${i.parent.avatar_url}?thumbnail&size=32`" alt=""> + <img :src="`${i.parent.avatarUrl}?thumbnail&size=32`" alt=""> <span class="name"><b>{{ i.parent.name }}</b></span> <span class="username">@{{ i.parent.username }}</span> <mk-time :time="i.createdAt"/> @@ -40,8 +40,8 @@ <section v-if="myGames.length > 0"> <h2>自分の対局</h2> <a class="game" v-for="g in myGames" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`"> - <img :src="`${g.user1.avatar_url}?thumbnail&size=32`" alt=""> - <img :src="`${g.user2.avatar_url}?thumbnail&size=32`" alt=""> + <img :src="`${g.user1.avatarUrl}?thumbnail&size=32`" alt=""> + <img :src="`${g.user2.avatarUrl}?thumbnail&size=32`" alt=""> <span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span> <span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span> </a> @@ -49,8 +49,8 @@ <section v-if="games.length > 0"> <h2>みんなの対局</h2> <a class="game" v-for="g in games" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`"> - <img :src="`${g.user1.avatar_url}?thumbnail&size=32`" alt=""> - <img :src="`${g.user2.avatar_url}?thumbnail&size=32`" alt=""> + <img :src="`${g.user1.avatarUrl}?thumbnail&size=32`" alt=""> + <img :src="`${g.user2.avatarUrl}?thumbnail&size=32`" alt=""> <span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span> <span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span> </a> diff --git a/src/web/app/common/views/components/welcome-timeline.vue b/src/web/app/common/views/components/welcome-timeline.vue index c61cae0f76..8f6199732a 100644 --- a/src/web/app/common/views/components/welcome-timeline.vue +++ b/src/web/app/common/views/components/welcome-timeline.vue @@ -2,7 +2,7 @@ <div class="mk-welcome-timeline"> <div v-for="post in posts"> <router-link class="avatar-anchor" :to="`/@${getAcct(post.user)}`" v-user-preview="post.user.id"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=96`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/> </router-link> <div class="body"> <header> diff --git a/src/web/app/desktop/api/update-avatar.ts b/src/web/app/desktop/api/update-avatar.ts index 445ef7d745..36a2ffe914 100644 --- a/src/web/app/desktop/api/update-avatar.ts +++ b/src/web/app/desktop/api/update-avatar.ts @@ -71,7 +71,7 @@ export default (os: OS) => (cb, file = null) => { avatarId: file.id }).then(i => { os.i.avatarId = i.avatarId; - os.i.avatar_url = i.avatar_url; + os.i.avatarUrl = i.avatarUrl; os.apis.dialog({ title: '%fa:info-circle%アバターを更新しました', diff --git a/src/web/app/desktop/api/update-banner.ts b/src/web/app/desktop/api/update-banner.ts index 002efce8ce..e66dbf016b 100644 --- a/src/web/app/desktop/api/update-banner.ts +++ b/src/web/app/desktop/api/update-banner.ts @@ -71,7 +71,7 @@ export default (os: OS) => (cb, file = null) => { bannerId: file.id }).then(i => { os.i.bannerId = i.bannerId; - os.i.banner_url = i.banner_url; + os.i.bannerUrl = i.bannerUrl; os.apis.dialog({ title: '%fa:info-circle%バナーを更新しました', diff --git a/src/web/app/desktop/views/components/followers-window.vue b/src/web/app/desktop/views/components/followers-window.vue index d41d356f9b..623971fa33 100644 --- a/src/web/app/desktop/views/components/followers-window.vue +++ b/src/web/app/desktop/views/components/followers-window.vue @@ -1,7 +1,7 @@ <template> <mk-window width="400px" height="550px" @closed="$destroy"> <span slot="header" :class="$style.header"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー + <img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー </span> <mk-followers :user="user"/> </mk-window> diff --git a/src/web/app/desktop/views/components/following-window.vue b/src/web/app/desktop/views/components/following-window.vue index c516b3b17b..612847b386 100644 --- a/src/web/app/desktop/views/components/following-window.vue +++ b/src/web/app/desktop/views/components/following-window.vue @@ -1,7 +1,7 @@ <template> <mk-window width="400px" height="550px" @closed="$destroy"> <span slot="header" :class="$style.header"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー + <img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー </span> <mk-following :user="user"/> </mk-window> diff --git a/src/web/app/desktop/views/components/friends-maker.vue b/src/web/app/desktop/views/components/friends-maker.vue index eed15e0773..fd9914b152 100644 --- a/src/web/app/desktop/views/components/friends-maker.vue +++ b/src/web/app/desktop/views/components/friends-maker.vue @@ -4,7 +4,7 @@ <div class="users" v-if="!fetching && users.length > 0"> <div class="user" v-for="user in users" :key="user.id"> <router-link class="avatar-anchor" :to="`/@${getAcct(user)}`"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="user.id"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="user.id"/> </router-link> <div class="body"> <router-link class="name" :to="`/@${getAcct(user)}`" v-user-preview="user.id">{{ user.name }}</router-link> diff --git a/src/web/app/desktop/views/components/mentions.vue b/src/web/app/desktop/views/components/mentions.vue index 47066e813f..90a92495b7 100644 --- a/src/web/app/desktop/views/components/mentions.vue +++ b/src/web/app/desktop/views/components/mentions.vue @@ -70,7 +70,7 @@ export default Vue.extend({ this.moreFetching = true; (this as any).api('posts/mentions', { following: this.mode == 'following', - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { this.posts = this.posts.concat(posts); this.moreFetching = false; diff --git a/src/web/app/desktop/views/components/notifications.vue b/src/web/app/desktop/views/components/notifications.vue index 62593cf97e..5e6db08c12 100644 --- a/src/web/app/desktop/views/components/notifications.vue +++ b/src/web/app/desktop/views/components/notifications.vue @@ -6,7 +6,7 @@ <mk-time :time="notification.createdAt"/> <template v-if="notification.type == 'reaction'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p> @@ -20,7 +20,7 @@ </template> <template v-if="notification.type == 'repost'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:retweet% @@ -33,7 +33,7 @@ </template> <template v-if="notification.type == 'quote'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:quote-left% @@ -44,7 +44,7 @@ </template> <template v-if="notification.type == 'follow'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:user-plus% @@ -54,7 +54,7 @@ </template> <template v-if="notification.type == 'reply'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:reply% @@ -65,7 +65,7 @@ </template> <template v-if="notification.type == 'mention'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:at% @@ -76,7 +76,7 @@ </template> <template v-if="notification.type == 'poll_vote'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:chart-pie%<a :href="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id">{{ notification.user.name }}</a></p> @@ -161,7 +161,7 @@ export default Vue.extend({ (this as any).api('i/notifications', { limit: max + 1, - until_id: this.notifications[this.notifications.length - 1].id + untilId: this.notifications[this.notifications.length - 1].id }).then(notifications => { if (notifications.length == max + 1) { this.moreNotifications = true; diff --git a/src/web/app/desktop/views/components/post-detail.sub.vue b/src/web/app/desktop/views/components/post-detail.sub.vue index 7453a8bfcf..35377e7c24 100644 --- a/src/web/app/desktop/views/components/post-detail.sub.vue +++ b/src/web/app/desktop/views/components/post-detail.sub.vue @@ -1,7 +1,7 @@ <template> <div class="sub" :title="title"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/desktop/views/components/post-detail.vue b/src/web/app/desktop/views/components/post-detail.vue index 1ab751aaf8..611660f523 100644 --- a/src/web/app/desktop/views/components/post-detail.vue +++ b/src/web/app/desktop/views/components/post-detail.vue @@ -19,7 +19,7 @@ <div class="repost" v-if="isRepost"> <p> <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/> </router-link> %fa:retweet% <router-link class="name" :href="`/@${acct}`">{{ post.user.name }}</router-link> @@ -28,7 +28,7 @@ </div> <article> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> + <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> </router-link> <header> <router-link class="name" :to="`/@${acct}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link> diff --git a/src/web/app/desktop/views/components/post-preview.vue b/src/web/app/desktop/views/components/post-preview.vue index 450632656d..0ac3223be2 100644 --- a/src/web/app/desktop/views/components/post-preview.vue +++ b/src/web/app/desktop/views/components/post-preview.vue @@ -1,7 +1,7 @@ <template> <div class="mk-post-preview" :title="title"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/desktop/views/components/posts.post.sub.vue b/src/web/app/desktop/views/components/posts.post.sub.vue index 7d2695d6b9..65d3017d3d 100644 --- a/src/web/app/desktop/views/components/posts.post.sub.vue +++ b/src/web/app/desktop/views/components/posts.post.sub.vue @@ -1,7 +1,7 @@ <template> <div class="sub" :title="title"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/desktop/views/components/posts.post.vue b/src/web/app/desktop/views/components/posts.post.vue index 185a621aae..e6dff2ccda 100644 --- a/src/web/app/desktop/views/components/posts.post.vue +++ b/src/web/app/desktop/views/components/posts.post.vue @@ -6,7 +6,7 @@ <div class="repost" v-if="isRepost"> <p> <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/> </router-link> %fa:retweet% <span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span> @@ -17,7 +17,7 @@ </div> <article> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> + <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/desktop/views/components/settings.password.vue b/src/web/app/desktop/views/components/settings.password.vue index be3f0370d6..f883b54065 100644 --- a/src/web/app/desktop/views/components/settings.password.vue +++ b/src/web/app/desktop/views/components/settings.password.vue @@ -33,8 +33,8 @@ export default Vue.extend({ return; } (this as any).api('i/change_password', { - current_password: currentPassword, - new_password: newPassword + currentPasword: currentPassword, + newPassword: newPassword }).then(() => { (this as any).apis.notify('%i18n:desktop.tags.mk-password-setting.changed%'); }); diff --git a/src/web/app/desktop/views/components/settings.profile.vue b/src/web/app/desktop/views/components/settings.profile.vue index f34d8ff00d..ba86286f87 100644 --- a/src/web/app/desktop/views/components/settings.profile.vue +++ b/src/web/app/desktop/views/components/settings.profile.vue @@ -2,7 +2,7 @@ <div class="profile"> <label class="avatar ui from group"> <p>%i18n:desktop.tags.mk-profile-setting.avatar%</p> - <img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${os.i.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <button class="ui" @click="updateAvatar">%i18n:desktop.tags.mk-profile-setting.choice-avatar%</button> </label> <label class="ui from group"> diff --git a/src/web/app/desktop/views/components/settings.vue b/src/web/app/desktop/views/components/settings.vue index cf75e52be2..fd82c171c1 100644 --- a/src/web/app/desktop/views/components/settings.vue +++ b/src/web/app/desktop/views/components/settings.vue @@ -86,7 +86,7 @@ <section class="notification" v-show="page == 'notification'"> <h1>通知</h1> - <mk-switch v-model="os.i.account.settings.auto_watch" @change="onChangeAutoWatch" text="投稿の自動ウォッチ"> + <mk-switch v-model="os.i.account.settings.autoWatch" @change="onChangeAutoWatch" text="投稿の自動ウォッチ"> <span>リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします。</span> </mk-switch> </section> @@ -283,7 +283,7 @@ export default Vue.extend({ }, onChangeAutoWatch(v) { (this as any).api('i/update', { - auto_watch: v + autoWatch: v }); }, onChangeShowPostFormOnTopOfTl(v) { diff --git a/src/web/app/desktop/views/components/timeline.vue b/src/web/app/desktop/views/components/timeline.vue index c0eae2cd9e..65b4bd1c7a 100644 --- a/src/web/app/desktop/views/components/timeline.vue +++ b/src/web/app/desktop/views/components/timeline.vue @@ -65,7 +65,7 @@ export default Vue.extend({ (this as any).api('posts/timeline', { limit: 11, - until_date: this.date ? this.date.getTime() : undefined + untilDate: this.date ? this.date.getTime() : undefined }).then(posts => { if (posts.length == 11) { posts.pop(); @@ -82,7 +82,7 @@ export default Vue.extend({ this.moreFetching = true; (this as any).api('posts/timeline', { limit: 11, - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { if (posts.length == 11) { posts.pop(); diff --git a/src/web/app/desktop/views/components/ui.header.account.vue b/src/web/app/desktop/views/components/ui.header.account.vue index 19b9d77798..ec4635f338 100644 --- a/src/web/app/desktop/views/components/ui.header.account.vue +++ b/src/web/app/desktop/views/components/ui.header.account.vue @@ -2,7 +2,7 @@ <div class="account"> <button class="header" :data-active="isOpen" @click="toggle"> <span class="username">{{ os.i.username }}<template v-if="!isOpen">%fa:angle-down%</template><template v-if="isOpen">%fa:angle-up%</template></span> - <img class="avatar" :src="`${ os.i.avatar_url }?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${ os.i.avatarUrl }?thumbnail&size=64`" alt="avatar"/> </button> <transition name="zoom-in-top"> <div class="menu" v-if="isOpen"> diff --git a/src/web/app/desktop/views/components/user-preview.vue b/src/web/app/desktop/views/components/user-preview.vue index 4535ad8902..8c86b2efe8 100644 --- a/src/web/app/desktop/views/components/user-preview.vue +++ b/src/web/app/desktop/views/components/user-preview.vue @@ -1,9 +1,9 @@ <template> <div class="mk-user-preview"> <template v-if="u != null"> - <div class="banner" :style="u.banner_url ? `background-image: url(${u.banner_url}?thumbnail&size=512)` : ''"></div> + <div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div> <router-link class="avatar" :to="`/@${acct}`"> - <img :src="`${u.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img :src="`${u.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="title"> <router-link class="name" :to="`/@${acct}`">{{ u.name }}</router-link> diff --git a/src/web/app/desktop/views/components/users-list.item.vue b/src/web/app/desktop/views/components/users-list.item.vue index e02d1311d2..c2f30cf382 100644 --- a/src/web/app/desktop/views/components/users-list.item.vue +++ b/src/web/app/desktop/views/components/users-list.item.vue @@ -1,7 +1,7 @@ <template> <div class="root item"> <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="user.id"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/desktop/views/pages/user/user.followers-you-know.vue b/src/web/app/desktop/views/pages/user/user.followers-you-know.vue index 9f67f5cf76..d0dab6c3df 100644 --- a/src/web/app/desktop/views/pages/user/user.followers-you-know.vue +++ b/src/web/app/desktop/views/pages/user/user.followers-you-know.vue @@ -4,7 +4,7 @@ <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.followers-you-know.loading%<mk-ellipsis/></p> <div v-if="!fetching && users.length > 0"> <router-link v-for="user in users" :to="`/@${getAcct(user)}`" :key="user.id"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/> + <img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/> </router-link> </div> <p class="empty" v-if="!fetching && users.length == 0">%i18n:desktop.tags.mk-user.followers-you-know.no-users%</p> diff --git a/src/web/app/desktop/views/pages/user/user.friends.vue b/src/web/app/desktop/views/pages/user/user.friends.vue index cc0bcef257..3ec30fb438 100644 --- a/src/web/app/desktop/views/pages/user/user.friends.vue +++ b/src/web/app/desktop/views/pages/user/user.friends.vue @@ -5,7 +5,7 @@ <template v-if="!fetching && users.length != 0"> <div class="user" v-for="friend in users"> <router-link class="avatar-anchor" :to="`/@${getAcct(friend)}`"> - <img class="avatar" :src="`${friend.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/> + <img class="avatar" :src="`${friend.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/> </router-link> <div class="body"> <router-link class="name" :to="`/@${getAcct(friend)}`" v-user-preview="friend.id">{{ friend.name }}</router-link> diff --git a/src/web/app/desktop/views/pages/user/user.header.vue b/src/web/app/desktop/views/pages/user/user.header.vue index 3522e76bdb..54f431fd2e 100644 --- a/src/web/app/desktop/views/pages/user/user.header.vue +++ b/src/web/app/desktop/views/pages/user/user.header.vue @@ -1,11 +1,11 @@ <template> -<div class="header" :data-is-dark-background="user.banner_url != null"> - <div class="banner-container" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=2048)` : ''"> - <div class="banner" ref="banner" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=2048)` : ''" @click="onBannerClick"></div> +<div class="header" :data-is-dark-background="user.bannerUrl != null"> + <div class="banner-container" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''"> + <div class="banner" ref="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''" @click="onBannerClick"></div> </div> <div class="fade"></div> <div class="container"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=150`" alt="avatar"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=150`" alt="avatar"/> <div class="title"> <p class="name">{{ user.name }}</p> <p class="username">@{{ acct }}</p> @@ -59,7 +59,7 @@ export default Vue.extend({ if (!(this as any).os.isSignedIn || (this as any).os.i.id != this.user.id) return; (this as any).apis.updateBanner((this as any).os.i, i => { - this.user.banner_url = i.banner_url; + this.user.bannerUrl = i.bannerUrl; }); } } diff --git a/src/web/app/desktop/views/pages/user/user.timeline.vue b/src/web/app/desktop/views/pages/user/user.timeline.vue index 1f0d0b1985..134ad423ce 100644 --- a/src/web/app/desktop/views/pages/user/user.timeline.vue +++ b/src/web/app/desktop/views/pages/user/user.timeline.vue @@ -62,7 +62,7 @@ export default Vue.extend({ fetch(cb?) { (this as any).api('users/posts', { userId: this.user.id, - until_date: this.date ? this.date.getTime() : undefined, + untilDate: this.date ? this.date.getTime() : undefined, with_replies: this.mode == 'with-replies' }).then(posts => { this.posts = posts; @@ -76,7 +76,7 @@ export default Vue.extend({ (this as any).api('users/posts', { userId: this.user.id, with_replies: this.mode == 'with-replies', - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { this.moreFetching = false; this.posts = this.posts.concat(posts); diff --git a/src/web/app/desktop/views/pages/welcome.vue b/src/web/app/desktop/views/pages/welcome.vue index 927ddf575b..34c28854b1 100644 --- a/src/web/app/desktop/views/pages/welcome.vue +++ b/src/web/app/desktop/views/pages/welcome.vue @@ -9,7 +9,7 @@ <p><button class="signup" @click="signup">はじめる</button><button class="signin" @click="signin">ログイン</button></p> <div class="users"> <router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/@${getAcct(user)}`" v-user-preview="user.id"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> </div> </div> diff --git a/src/web/app/desktop/views/widgets/profile.vue b/src/web/app/desktop/views/widgets/profile.vue index 3940106197..83cd67b50c 100644 --- a/src/web/app/desktop/views/widgets/profile.vue +++ b/src/web/app/desktop/views/widgets/profile.vue @@ -4,12 +4,12 @@ :data-melt="props.design == 2" > <div class="banner" - :style="os.i.banner_url ? `background-image: url(${os.i.banner_url}?thumbnail&size=256)` : ''" + :style="os.i.bannerUrl ? `background-image: url(${os.i.bannerUrl}?thumbnail&size=256)` : ''" title="クリックでバナー編集" @click="os.apis.updateBanner" ></div> <img class="avatar" - :src="`${os.i.avatar_url}?thumbnail&size=96`" + :src="`${os.i.avatarUrl}?thumbnail&size=96`" @click="os.apis.updateAvatar" alt="avatar" title="クリックでアバター編集" diff --git a/src/web/app/desktop/views/widgets/users.vue b/src/web/app/desktop/views/widgets/users.vue index 10e3c529ee..7b89441126 100644 --- a/src/web/app/desktop/views/widgets/users.vue +++ b/src/web/app/desktop/views/widgets/users.vue @@ -8,7 +8,7 @@ <template v-else-if="users.length != 0"> <div class="user" v-for="_user in users"> <router-link class="avatar-anchor" :to="`/@${getAcct(_user)}`"> - <img class="avatar" :src="`${_user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/> + <img class="avatar" :src="`${_user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/> </router-link> <div class="body"> <router-link class="name" :to="`/@${getAcct(_user)}`" v-user-preview="_user.id">{{ _user.name }}</router-link> diff --git a/src/web/app/dev/views/new-app.vue b/src/web/app/dev/views/new-app.vue index cd07cc4d49..e407ca00d7 100644 --- a/src/web/app/dev/views/new-app.vue +++ b/src/web/app/dev/views/new-app.vue @@ -92,7 +92,7 @@ export default Vue.extend({ name: this.name, nameId: this.nid, description: this.description, - callback_url: this.cb, + callbackUrl: this.cb, permission: this.permission }).then(() => { location.href = '/apps'; diff --git a/src/web/app/mobile/views/components/drive.vue b/src/web/app/mobile/views/components/drive.vue index dd4d97e960..5affbdaf1f 100644 --- a/src/web/app/mobile/views/components/drive.vue +++ b/src/web/app/mobile/views/components/drive.vue @@ -320,7 +320,7 @@ export default Vue.extend({ (this as any).api('drive/files', { folderId: this.folder ? this.folder.id : null, limit: max + 1, - until_id: this.files[this.files.length - 1].id + untilId: this.files[this.files.length - 1].id }).then(files => { if (files.length == max + 1) { this.moreFiles = true; diff --git a/src/web/app/mobile/views/components/notification-preview.vue b/src/web/app/mobile/views/components/notification-preview.vue index 47df626fa8..fce9ed82f9 100644 --- a/src/web/app/mobile/views/components/notification-preview.vue +++ b/src/web/app/mobile/views/components/notification-preview.vue @@ -1,7 +1,7 @@ <template> <div class="mk-notification-preview" :class="notification.type"> <template v-if="notification.type == 'reaction'"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <div class="text"> <p><mk-reaction-icon :reaction="notification.reaction"/>{{ notification.user.name }}</p> <p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%</p> @@ -9,7 +9,7 @@ </template> <template v-if="notification.type == 'repost'"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <div class="text"> <p>%fa:retweet%{{ notification.post.user.name }}</p> <p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right%</p> @@ -17,7 +17,7 @@ </template> <template v-if="notification.type == 'quote'"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <div class="text"> <p>%fa:quote-left%{{ notification.post.user.name }}</p> <p class="post-preview">{{ getPostSummary(notification.post) }}</p> @@ -25,14 +25,14 @@ </template> <template v-if="notification.type == 'follow'"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <div class="text"> <p>%fa:user-plus%{{ notification.user.name }}</p> </div> </template> <template v-if="notification.type == 'reply'"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <div class="text"> <p>%fa:reply%{{ notification.post.user.name }}</p> <p class="post-preview">{{ getPostSummary(notification.post) }}</p> @@ -40,7 +40,7 @@ </template> <template v-if="notification.type == 'mention'"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <div class="text"> <p>%fa:at%{{ notification.post.user.name }}</p> <p class="post-preview">{{ getPostSummary(notification.post) }}</p> @@ -48,7 +48,7 @@ </template> <template v-if="notification.type == 'poll_vote'"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <div class="text"> <p>%fa:chart-pie%{{ notification.user.name }}</p> <p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%</p> diff --git a/src/web/app/mobile/views/components/notification.vue b/src/web/app/mobile/views/components/notification.vue index aac8f82900..e221fb3ac4 100644 --- a/src/web/app/mobile/views/components/notification.vue +++ b/src/web/app/mobile/views/components/notification.vue @@ -3,7 +3,7 @@ <div class="notification reaction" v-if="notification.type == 'reaction'"> <mk-time :time="notification.createdAt"/> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="text"> <p> @@ -20,7 +20,7 @@ <div class="notification repost" v-if="notification.type == 'repost'"> <mk-time :time="notification.createdAt"/> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="text"> <p> @@ -40,7 +40,7 @@ <div class="notification follow" v-if="notification.type == 'follow'"> <mk-time :time="notification.createdAt"/> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="text"> <p> @@ -61,7 +61,7 @@ <div class="notification poll_vote" v-if="notification.type == 'poll_vote'"> <mk-time :time="notification.createdAt"/> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="text"> <p> diff --git a/src/web/app/mobile/views/components/notifications.vue b/src/web/app/mobile/views/components/notifications.vue index 4365198f16..d68b990dfa 100644 --- a/src/web/app/mobile/views/components/notifications.vue +++ b/src/web/app/mobile/views/components/notifications.vue @@ -75,7 +75,7 @@ export default Vue.extend({ (this as any).api('i/notifications', { limit: max + 1, - until_id: this.notifications[this.notifications.length - 1].id + untilId: this.notifications[this.notifications.length - 1].id }).then(notifications => { if (notifications.length == max + 1) { this.moreNotifications = true; diff --git a/src/web/app/mobile/views/components/post-detail.sub.vue b/src/web/app/mobile/views/components/post-detail.sub.vue index 427e054fd6..db7567834a 100644 --- a/src/web/app/mobile/views/components/post-detail.sub.vue +++ b/src/web/app/mobile/views/components/post-detail.sub.vue @@ -1,7 +1,7 @@ <template> <div class="root sub"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/mobile/views/components/post-detail.vue b/src/web/app/mobile/views/components/post-detail.vue index 9a8c33a80d..241782aa5f 100644 --- a/src/web/app/mobile/views/components/post-detail.vue +++ b/src/web/app/mobile/views/components/post-detail.vue @@ -18,7 +18,7 @@ <div class="repost" v-if="isRepost"> <p> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/> </router-link> %fa:retweet% <router-link class="name" :to="`/@${acct}`"> @@ -30,7 +30,7 @@ <article> <header> <router-link class="avatar-anchor" :to="`/@${pAcct}`"> - <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div> <router-link class="name" :to="`/@${pAcct}`">{{ p.user.name }}</router-link> diff --git a/src/web/app/mobile/views/components/post-preview.vue b/src/web/app/mobile/views/components/post-preview.vue index e640843419..a6141dc8e3 100644 --- a/src/web/app/mobile/views/components/post-preview.vue +++ b/src/web/app/mobile/views/components/post-preview.vue @@ -1,7 +1,7 @@ <template> <div class="mk-post-preview"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/mobile/views/components/post.sub.vue b/src/web/app/mobile/views/components/post.sub.vue index 8a11239da7..adf444a2d6 100644 --- a/src/web/app/mobile/views/components/post.sub.vue +++ b/src/web/app/mobile/views/components/post.sub.vue @@ -1,7 +1,7 @@ <template> <div class="sub"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=96`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/mobile/views/components/post.vue b/src/web/app/mobile/views/components/post.vue index 243e7d9c2e..0c6522db86 100644 --- a/src/web/app/mobile/views/components/post.vue +++ b/src/web/app/mobile/views/components/post.vue @@ -6,7 +6,7 @@ <div class="repost" v-if="isRepost"> <p> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> %fa:retweet% <span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span> @@ -17,7 +17,7 @@ </div> <article> <router-link class="avatar-anchor" :to="`/@${pAcct}`"> - <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=96`" alt="avatar"/> + <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/mobile/views/components/timeline.vue b/src/web/app/mobile/views/components/timeline.vue index 999f4a1f1e..7b5948faf1 100644 --- a/src/web/app/mobile/views/components/timeline.vue +++ b/src/web/app/mobile/views/components/timeline.vue @@ -65,7 +65,7 @@ export default Vue.extend({ this.fetching = true; (this as any).api('posts/timeline', { limit: limit + 1, - until_date: this.date ? (this.date as any).getTime() : undefined + untilDate: this.date ? (this.date as any).getTime() : undefined }).then(posts => { if (posts.length == limit + 1) { posts.pop(); @@ -81,7 +81,7 @@ export default Vue.extend({ this.moreFetching = true; (this as any).api('posts/timeline', { limit: limit + 1, - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { if (posts.length == limit + 1) { posts.pop(); diff --git a/src/web/app/mobile/views/components/ui.nav.vue b/src/web/app/mobile/views/components/ui.nav.vue index 760a5b5184..a923774a73 100644 --- a/src/web/app/mobile/views/components/ui.nav.vue +++ b/src/web/app/mobile/views/components/ui.nav.vue @@ -10,7 +10,7 @@ <transition name="nav"> <div class="body" v-if="isOpen"> <router-link class="me" v-if="os.isSignedIn" :to="`/@${os.i.username}`"> - <img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=128`" alt="avatar"/> + <img class="avatar" :src="`${os.i.avatarUrl}?thumbnail&size=128`" alt="avatar"/> <p class="name">{{ os.i.name }}</p> </router-link> <div class="links"> diff --git a/src/web/app/mobile/views/components/user-card.vue b/src/web/app/mobile/views/components/user-card.vue index 5a7309cfd3..ffa1100519 100644 --- a/src/web/app/mobile/views/components/user-card.vue +++ b/src/web/app/mobile/views/components/user-card.vue @@ -1,8 +1,8 @@ <template> <div class="mk-user-card"> - <header :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''"> + <header :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=1024)` : ''"> <a :href="`/@${acct}`"> - <img :src="`${user.avatar_url}?thumbnail&size=200`" alt="avatar"/> + <img :src="`${user.avatarUrl}?thumbnail&size=200`" alt="avatar"/> </a> </header> <a class="name" :href="`/@${acct}`" target="_blank">{{ user.name }}</a> diff --git a/src/web/app/mobile/views/components/user-preview.vue b/src/web/app/mobile/views/components/user-preview.vue index be80582cac..e51e4353d3 100644 --- a/src/web/app/mobile/views/components/user-preview.vue +++ b/src/web/app/mobile/views/components/user-preview.vue @@ -1,7 +1,7 @@ <template> <div class="mk-user-preview"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="main"> <header> diff --git a/src/web/app/mobile/views/components/user-timeline.vue b/src/web/app/mobile/views/components/user-timeline.vue index 73ff440dc2..d1f771f812 100644 --- a/src/web/app/mobile/views/components/user-timeline.vue +++ b/src/web/app/mobile/views/components/user-timeline.vue @@ -53,7 +53,7 @@ export default Vue.extend({ userId: this.user.id, with_media: this.withMedia, limit: limit + 1, - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { if (posts.length == limit + 1) { posts.pop(); diff --git a/src/web/app/mobile/views/pages/followers.vue b/src/web/app/mobile/views/pages/followers.vue index b5267bebf4..08a15f945a 100644 --- a/src/web/app/mobile/views/pages/followers.vue +++ b/src/web/app/mobile/views/pages/followers.vue @@ -1,7 +1,7 @@ <template> <mk-ui> <template slot="header" v-if="!fetching"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""> + <img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""> {{ '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) }} </template> <mk-users-list diff --git a/src/web/app/mobile/views/pages/following.vue b/src/web/app/mobile/views/pages/following.vue index d8c31c9f01..ecdaa5a586 100644 --- a/src/web/app/mobile/views/pages/following.vue +++ b/src/web/app/mobile/views/pages/following.vue @@ -1,7 +1,7 @@ <template> <mk-ui> <template slot="header" v-if="!fetching"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""> + <img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""> {{ '%i18n:mobile.tags.mk-user-following-page.following-of%'.replace('{}', user.name) }} </template> <mk-users-list diff --git a/src/web/app/mobile/views/pages/notifications.vue b/src/web/app/mobile/views/pages/notifications.vue index 3dcfb2f38c..6d45e22a9c 100644 --- a/src/web/app/mobile/views/pages/notifications.vue +++ b/src/web/app/mobile/views/pages/notifications.vue @@ -22,7 +22,7 @@ export default Vue.extend({ const ok = window.confirm('%i18n:mobile.tags.mk-notifications-page.read-all%'); if (!ok) return; - (this as any).api('notifications/mark_as_read_all'); + (this as any).api('notifications/markAsRead_all'); }, onFetched() { Progress.done(); diff --git a/src/web/app/mobile/views/pages/profile-setting.vue b/src/web/app/mobile/views/pages/profile-setting.vue index d4bb254877..15f9bc9b68 100644 --- a/src/web/app/mobile/views/pages/profile-setting.vue +++ b/src/web/app/mobile/views/pages/profile-setting.vue @@ -4,8 +4,8 @@ <div :class="$style.content"> <p>%fa:info-circle%%i18n:mobile.tags.mk-profile-setting.will-be-published%</p> <div :class="$style.form"> - <div :style="os.i.banner_url ? `background-image: url(${os.i.banner_url}?thumbnail&size=1024)` : ''" @click="setBanner"> - <img :src="`${os.i.avatar_url}?thumbnail&size=200`" alt="avatar" @click="setAvatar"/> + <div :style="os.i.bannerUrl ? `background-image: url(${os.i.bannerUrl}?thumbnail&size=1024)` : ''" @click="setBanner"> + <img :src="`${os.i.avatarUrl}?thumbnail&size=200`" alt="avatar" @click="setAvatar"/> </div> <label> <p>%i18n:mobile.tags.mk-profile-setting.name%</p> diff --git a/src/web/app/mobile/views/pages/user.vue b/src/web/app/mobile/views/pages/user.vue index c4d6b67e6c..f5bbd41625 100644 --- a/src/web/app/mobile/views/pages/user.vue +++ b/src/web/app/mobile/views/pages/user.vue @@ -3,11 +3,11 @@ <span slot="header" v-if="!fetching">%fa:user% {{ user.name }}</span> <main v-if="!fetching"> <header> - <div class="banner" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''"></div> + <div class="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=1024)` : ''"></div> <div class="body"> <div class="top"> <a class="avatar"> - <img :src="`${user.avatar_url}?thumbnail&size=200`" alt="avatar"/> + <img :src="`${user.avatarUrl}?thumbnail&size=200`" alt="avatar"/> </a> <mk-follow-button v-if="os.isSignedIn && os.i.id != user.id" :user="user"/> </div> diff --git a/src/web/app/mobile/views/pages/user/home.followers-you-know.vue b/src/web/app/mobile/views/pages/user/home.followers-you-know.vue index 508ab4b4a7..8c84d2dbba 100644 --- a/src/web/app/mobile/views/pages/user/home.followers-you-know.vue +++ b/src/web/app/mobile/views/pages/user/home.followers-you-know.vue @@ -3,7 +3,7 @@ <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:mobile.tags.mk-user-overview-followers-you-know.loading%<mk-ellipsis/></p> <div v-if="!fetching && users.length > 0"> <a v-for="user in users" :key="user.id" :href="`/@${getAcct(user)}`"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name"/> + <img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user.name"/> </a> </div> <p class="empty" v-if="!fetching && users.length == 0">%i18n:mobile.tags.mk-user-overview-followers-you-know.no-users%</p> diff --git a/src/web/app/mobile/views/pages/welcome.vue b/src/web/app/mobile/views/pages/welcome.vue index 7a809702c5..17cdf93065 100644 --- a/src/web/app/mobile/views/pages/welcome.vue +++ b/src/web/app/mobile/views/pages/welcome.vue @@ -22,7 +22,7 @@ </div> <div class="users"> <router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/@${user.username}`"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> </div> <footer> diff --git a/src/web/app/mobile/views/widgets/profile.vue b/src/web/app/mobile/views/widgets/profile.vue index 1c9d038b4c..f1d283e45a 100644 --- a/src/web/app/mobile/views/widgets/profile.vue +++ b/src/web/app/mobile/views/widgets/profile.vue @@ -2,10 +2,10 @@ <div class="mkw-profile"> <mk-widget-container> <div :class="$style.banner" - :style="os.i.banner_url ? `background-image: url(${os.i.banner_url}?thumbnail&size=256)` : ''" + :style="os.i.bannerUrl ? `background-image: url(${os.i.bannerUrl}?thumbnail&size=256)` : ''" ></div> <img :class="$style.avatar" - :src="`${os.i.avatar_url}?thumbnail&size=96`" + :src="`${os.i.avatarUrl}?thumbnail&size=96`" alt="avatar" /> <router-link :class="$style.name" :to="`/@${os.i.username}`">{{ os.i.name }}</router-link> diff --git a/src/web/docs/api.ja.pug b/src/web/docs/api.ja.pug index 2bb08f7f32..665cfdc4b8 100644 --- a/src/web/docs/api.ja.pug +++ b/src/web/docs/api.ja.pug @@ -54,7 +54,7 @@ section h3 2.ユーザーに認証させる p あなたのアプリを使ってもらうには、ユーザーにアカウントへのアクセスの許可をもらう必要があります。 p - | 認証セッションを開始するには、#{common.config.api_url}/auth/session/generate へパラメータに app_secret としてシークレットキーを含めたリクエストを送信します。 + | 認証セッションを開始するには、#{common.config.api_url}/auth/session/generate へパラメータに appSecret としてシークレットキーを含めたリクエストを送信します。 | リクエスト形式はJSONで、メソッドはPOSTです。 | レスポンスとして認証セッションのトークンや認証フォームのURLが取得できるので、認証フォームのURLをブラウザで表示し、ユーザーにフォームを提示してください。 @@ -76,7 +76,7 @@ section th 説明 tbody tr - td app_secret + td appSecret td string td あなたのアプリのシークレットキー tr diff --git a/src/web/docs/api/endpoints/posts/timeline.yaml b/src/web/docs/api/endpoints/posts/timeline.yaml index 01976b0611..9c44dd736a 100644 --- a/src/web/docs/api/endpoints/posts/timeline.yaml +++ b/src/web/docs/api/endpoints/posts/timeline.yaml @@ -10,22 +10,22 @@ params: optional: true desc: ja: "取得する最大の数" - - name: "since_id" + - name: "sinceId" type: "id(Post)" optional: true desc: ja: "指定すると、この投稿を基点としてより新しい投稿を取得します" - - name: "until_id" + - name: "untilId" type: "id(Post)" optional: true desc: ja: "指定すると、この投稿を基点としてより古い投稿を取得します" - - name: "since_date" + - name: "sinceDate" type: "number" optional: true desc: ja: "指定した時間を基点としてより新しい投稿を取得します。数値は、1970 年 1 月 1 日 00:00:00 UTC から指定した日時までの経過時間をミリ秒単位で表します。" - - name: "until_date" + - name: "untilDate" type: "number" optional: true desc: diff --git a/src/web/docs/api/entities/user.yaml b/src/web/docs/api/entities/user.yaml index 60f2c86084..f45455e731 100644 --- a/src/web/docs/api/entities/user.yaml +++ b/src/web/docs/api/entities/user.yaml @@ -35,7 +35,7 @@ props: desc: ja: "アバターのID" en: "The ID of the avatar of this user" - - name: "avatar_url" + - name: "avatarUrl" type: "string" optional: false desc: @@ -47,7 +47,7 @@ props: desc: ja: "バナーのID" en: "The ID of the banner of this user" - - name: "banner_url" + - name: "bannerUrl" type: "string" optional: false desc: |