Unverified Commit d2007add authored by tamaina's avatar tamaina Committed by GitHub
Browse files

feat: Implement api sw/unregister (#7611)



* Implement api sw/unregister

* remove all mode

* add changelog
Co-authored-by: default avatarsyuilo <Syuilotan@yahoo.co.jp>
parent 802db92d
......@@ -14,6 +14,7 @@
- 絵文字オートコンプリートの挙動を改修
- localStorageのaccountsはindexedDBで保持するように
- ActivityPub: ジョブキューの試行タイミングを調整 (#7635)
- API: sw/unregisterを追加
- 依存関係の更新
### Bugfixes
......
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,
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment