diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-03-25 18:31:30 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-25 18:31:30 +0900 |
| commit | f90be427f51392ef3ed5a7eb7f35059274bb47fc (patch) | |
| tree | 022ebeb3d0a9ee3449cfec9a73307fdb81321ea0 /packages/backend/src/server/api/endpoints | |
| parent | fix(generator): APIクライアントのパスにoperationIdが使われる... (diff) | |
| download | sharkey-f90be427f51392ef3ed5a7eb7f35059274bb47fc.tar.gz sharkey-f90be427f51392ef3ed5a7eb7f35059274bb47fc.tar.bz2 sharkey-f90be427f51392ef3ed5a7eb7f35059274bb47fc.zip | |
fix(frontend): 「今日誕生日のフォロー中ユーザー」ウィジェットが正しく動作しない問題を修正 (#12835)
* (fix) タイムゾーンによっては誕生日のフォロー中ユーザーが正しく読み込まれない
* 文言をわかりやすく
* Update Changelog
* (add) reload button
* Update CHANGELOG.md
* run misskey-js
* fix
* Revert "文言をわかりやすく"
This reverts commit c5ab6419563cc70ec8ba758e800c74d3469131e3.
* Update packages/frontend/src/widgets/WidgetBirthdayFollowings.vue
* Update packages/frontend/src/widgets/WidgetBirthdayFollowings.vue
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/server/api/endpoints')
| -rw-r--r-- | packages/backend/src/server/api/endpoints/users/following.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 5d52ebba76..6b3389f0b2 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -6,6 +6,7 @@ import { IsNull } from 'typeorm'; import { Inject, Injectable } from '@nestjs/common'; import type { UsersRepository, FollowingsRepository, UserProfilesRepository } from '@/models/_.js'; +import { birthdaySchema } from '@/models/User.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import { QueryService } from '@/core/QueryService.js'; import { FollowingEntityService } from '@/core/entities/FollowingEntityService.js'; @@ -66,7 +67,7 @@ export const paramDef = { description: 'The local host is represented with `null`.', }, - birthday: { type: 'string', nullable: true }, + birthday: { ...birthdaySchema, nullable: true }, }, anyOf: [ { required: ['userId'] }, @@ -127,9 +128,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- if (ps.birthday) { try { - const d = new Date(ps.birthday); - d.setHours(0, 0, 0, 0); - const birthday = `${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`; + const birthday = ps.birthday.substring(5, 10); const birthdayUserQuery = this.userProfilesRepository.createQueryBuilder('user_profile'); birthdayUserQuery.select('user_profile.userId') .where(`SUBSTR(user_profile.birthday, 6, 5) = '${birthday}'`); |