mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 04:03:49 +01:00
feat: Implement api sw/unregister (#7611)
* Implement api sw/unregister * remove all mode * add changelog Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
1b8e3074cc
commit
0ed756d00d
@ -14,6 +14,7 @@
|
||||
- 絵文字オートコンプリートの挙動を改修
|
||||
- localStorageのaccountsはindexedDBで保持するように
|
||||
- ActivityPub: ジョブキューの試行タイミングを調整 (#7635)
|
||||
- API: sw/unregisterを追加
|
||||
- 依存関係の更新
|
||||
|
||||
### Bugfixes
|
||||
|
27
src/server/api/endpoints/sw/unregister.ts
Normal file
27
src/server/api/endpoints/sw/unregister.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import $ from 'cafy';
|
||||
import define from '../../define';
|
||||
import { SwSubscriptions } from '../../../../models';
|
||||
|
||||
export const meta = {
|
||||
tags: ['account'],
|
||||
|
||||
requireCredential: true as const,
|
||||
|
||||
desc: {
|
||||
'ja-JP': 'Push通知の登録を削除します。',
|
||||
'en-US': 'Remove push noticfication registration'
|
||||
},
|
||||
|
||||
params: {
|
||||
endpoint: {
|
||||
validator: $.str
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
await SwSubscriptions.delete({
|
||||
userId: user.id,
|
||||
endpoint: ps.endpoint,
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user