Commit Graph

1259 Commits

Author SHA1 Message Date
okayurisotto
4535728625 refactor(ApPersonService.ts): eslint-disable-next-line 2023-07-02 19:08:06 +09:00
okayurisotto
be415a96f9 refactor(ApPersonService.ts): eslint-disable-next-line 2023-07-02 19:07:15 +09:00
okayurisotto
8ee31e8002 refactor(ApNoteService.ts): non-null assertion -> optional chaining 2023-07-02 19:06:24 +09:00
okayurisotto
71ca66e24e WIP(ApNoteService.ts): non-null assertion
non-nullアサーションを減らすために事前に存在確認をするようにした。
エラーをスローするようにしたのでメッセージを考えなければならない。
2023-07-02 19:05:23 +09:00
okayurisotto
b1ecaecf40 WIP(ApPersonService.ts): as anyをなくした
エラーをスローするようにせざるを得なかったのでエラーメッセージを考える必要がある。
2023-07-02 18:34:52 +09:00
okayurisotto
44a1b6d5c0 refactor(ApPersonService.ts): eslint-disable-next-line 2023-07-02 18:20:44 +09:00
okayurisotto
39ad3da62d WIP(ApPersonService.ts): asを調整
`null`でないか確認する処理が続いていたので型アサーションは`null`とのunionにした。
より本質的な改善の余地があるように感じるのでひとまずWIPとしてコミット。
2023-07-02 18:20:18 +09:00
okayurisotto
50955427f6 cleanup(ApPersonService.ts): deadcode 2023-07-02 18:09:29 +09:00
okayurisotto
c7fd197efc cleanup(ApPersonService.ts): deadcode 2023-07-02 18:08:47 +09:00
okayurisotto
d3e23d9875 refactor(ApPersonService.ts): function return type 2023-07-02 18:08:23 +09:00
okayurisotto
58abc86def cleanup(ApPersonService.ts): deadcode 2023-07-02 18:07:56 +09:00
okayurisotto
3c17a9b07d cleanup(ApPersonService.ts): no-unused-vars 2023-07-02 18:07:27 +09:00
okayurisotto
8b3641eabe cleanup(ApNoteService.ts): 不要なasを削除 2023-07-02 14:11:51 +09:00
okayurisotto
f688d7a933 WIP(ApNoteService.ts): asをなくす
エラーメッセージを考える
2023-07-02 14:11:27 +09:00
okayurisotto
a24e709a06 refactor(ApNoteService.ts): 不要な条件を削除 2023-07-02 14:09:53 +09:00
okayurisotto
ad92cb607a cleanup(ApNoteService.ts): unneeded non-null assertion 2023-07-02 14:08:45 +09:00
okayurisotto
c788cbb195 cleanup(ApNoteService.ts): deadcode 2023-07-02 14:07:47 +09:00
okayurisotto
394678e444 refactor(ApNoteService.ts): eslint-disable-next-line 2023-07-02 14:07:32 +09:00
okayurisotto
c2b184b085 cleanup(ApNoteService.ts): 重要でないasを削除 2023-07-02 14:01:36 +09:00
okayurisotto
688ad27d08 cleanup(ApNoteService.ts) 2023-07-02 13:59:53 +09:00
okayurisotto
ad7b4e2527 refactor(ApNoteService.ts): 不要な条件を削除 2023-07-02 13:59:53 +09:00
okayurisotto
c234f3afe1 refactor(ApNoteService.ts): よりよい型定義
`res`が`null`でないことは確認されているようだったので`null`とのunionはなくした
2023-07-02 13:59:53 +09:00
okayurisotto
1af9392914 cleanup(ApNoteService.ts) 2023-07-02 13:50:06 +09:00
okayurisotto
dc291c593f refactor(ApNoteService.ts): note.attachment
- `toArray()`を使うように
- よくわからない条件式を整理
- `as`をなくすために`promiseLimit()`でジェネリクスを使うように
2023-07-02 13:43:32 +09:00
okayurisotto
370c1fb12a cleanup(ApNoteService.ts): unneeded await 2023-07-02 13:41:54 +09:00
okayurisotto
47a07d37f3 refactor(ApNoteService.ts): non-null assertion
これまでは`getApId()`の方でエラーがスローされていた。
2023-07-02 13:39:13 +09:00
okayurisotto
acce210f7d refactor(ApNoteService.ts): eslint-disable-next-line 2023-07-02 13:38:29 +09:00
okayurisotto
b203dab852 cleanup(ApNoteService.ts): deadcode 2023-07-02 13:36:23 +09:00
okayurisotto
1246382de4 refactor(ApNoteService.ts): function return type 2023-07-02 13:35:55 +09:00
okayurisotto
aeefb843a8 WIP(ApImageService.ts): image.urlgetApHrefNullable()に通すかどうか悩んでいる 2023-07-02 13:32:43 +09:00
okayurisotto
9dc2e98ef8 cleanup(ApNoteService.ts) 2023-07-02 13:32:39 +09:00
okayurisotto
fb459dee56 cleanup(ApNoteService.ts): unneeded eslint-disable-next-line 2023-07-02 13:32:26 +09:00
okayurisotto
9889ad6eb9 refactor(ApMentionService.ts) 2023-07-02 13:32:22 +09:00
okayurisotto
c9adcfa6fa cleanup(ApMentionService.ts) 2023-07-02 13:32:17 +09:00
okayurisotto
16ffe727cc cleanup(check-https.ts) 2023-07-02 13:32:13 +09:00
okayurisotto
1abb06d2cc refactor(ApImageService.ts) 2023-07-02 13:32:08 +09:00
okayurisotto
d66322c2b3 cleanup(ApImageService.ts) 2023-07-02 13:31:59 +09:00
syuilo
a1327fa9e1 perf(backend): allow get for some endpoints 2023-07-02 08:28:26 +09:00
Kagami Sascha Rosylight
1b1f82a2e2
feat(backend): accept OAuth bearer token (#11052)
* feat(backend): accept OAuth bearer token

* refactor

* Update packages/backend/src/server/api/ApiCallService.ts

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

* Update packages/backend/src/server/api/ApiCallService.ts

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

* fix

* kind: permission for account moved error

* also for suspended error

* Update packages/backend/src/server/api/StreamingApiServerService.ts

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

---------

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-06-28 13:37:13 +09:00
Kagami Sascha Rosylight
d48172e9d1
refactor(backend/test): add interface UserToken (#11050) 2023-06-27 08:07:20 +09:00
Kagami Sascha Rosylight
d23ad8b511
fix(backend): APIエラーのHTTP status code変更 (#11047) 2023-06-26 10:09:12 +09:00
syuilo
8099bc24e1
refactor(backend): use node16 for moduleResolution (#10938)
* refactor(backend): use node16 for moduleResolution

* update deps

* Update tsconfig.json

* ✌️

* revive KEYWORD

* restore strict-event-emitter-types dependency

* restore ms dependency

* cancel redundant import reorder

* fix

* Delete ms.ts

* remove rndstr

---------

Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>
2023-06-25 21:13:15 +09:00
Kagami Sascha Rosylight
ef354e94f2
refactor(backend): replace rndstr with secureRndstr (#11044)
* refactor(backend): replace rndstr with secureRndstr

* Update pnpm-lock.yaml

* .js
2023-06-25 11:04:33 +09:00
Kagami Sascha Rosylight
7bb8c71543
chore(backend, misskey-js): add type for signup (#11043)
* chore(backend, misskey-js): add type for signup

* rerun
2023-06-25 08:34:18 +09:00
Kagami Sascha Rosylight
a2c0573f84
refactor(backend): replace private-ip with ipaddr.js (#11041)
* refactor(backend): replace private-ip with ipaddr.js

* restore ip-cidr
2023-06-25 06:35:09 +09:00
syuilo
60cc7f62e6 update deps 2023-06-24 13:11:53 +09:00
Caipira
e8c5117b2d
fix(backend): Resolve missing parseObjectId in IdService (#11039) 2023-06-23 16:30:47 +09:00
Balazs Nadasdi
e2261b63e9
fix: clear queue endpoint error with redis script (#11037)
Error message:
```
ReplyError: ERR value is not an integer or out of range script: 720d973b3877f92b4fb3285ced83c97cdd204979, on @user_script:209.
```

The whole error can be tracked back to one of the arguments, which is
`Infinity` in the codebase, but it has to be a number.

The documentation in bullmq says `0` is unlimited[^1], and bullmq tries to
parse the argument with `tonumber` which returns with `-9223372036854775808` if
the argument is `"Infinity"` which is out of bound.

```
127.0.0.1:6379> eval 'return tonumber(ARGV[3])' '2' 'slippy.xyz:queue:inbox:inbox:delayed' 'slippy.xyz:queue:inbox:inbox:events' 'slippy.xyz:queue:inbox:inbox:' '1687183763944' Infinity 'delayed'
(integer) -9223372036854775808
127.0.0.1:6379>
```

[^1]: https://github.com/taskforcesh/bullmq/blob/master/src/commands/cleanJobsInSet-2.lua#L10

Signed-off-by: Efertone <efertone@pm.me>
2023-06-22 15:56:40 +09:00
syuilo
f5dfb64a52 ユーザー統計表示機能を削除
Resolve #10998
2023-06-13 14:13:33 +09:00
syuilo
46222d0258 tweak of f3a16bcd6 2023-06-10 17:41:52 +09:00