mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 16:38:23 +01:00
remove all mode
This commit is contained in:
parent
b96edad800
commit
0fdffe5288
1 changed files with 1 additions and 11 deletions
|
@ -16,21 +16,11 @@ export const meta = {
|
|||
endpoint: {
|
||||
validator: $.str
|
||||
},
|
||||
|
||||
all: {
|
||||
validator: $.optional.bool,
|
||||
default: false,
|
||||
desc: {
|
||||
'ja-JP': 'false(デフォルト)は、自分の登録のみが解除されます。trueを指定すると、指定したエンドポイントのすべての登録を解除します。'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
await SwSubscriptions.delete(ps.all ? {
|
||||
endpoint: ps.endpoint,
|
||||
} : {
|
||||
await SwSubscriptions.delete({
|
||||
userId: user.id,
|
||||
endpoint: ps.endpoint,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue