mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 17:13:09 +02:00
23 lines
383 B
TypeScript
23 lines
383 B
TypeScript
|
import $ from 'cafy';
|
||
|
import define from '../../define';
|
||
|
import { SwSubscriptions } from '../../../../models';
|
||
|
|
||
|
export const meta = {
|
||
|
tags: ['account'],
|
||
|
|
||
|
requireCredential: true as const,
|
||
|
|
||
|
params: {
|
||
|
endpoint: {
|
||
|
validator: $.str
|
||
|
},
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default define(meta, async (ps, user) => {
|
||
|
await SwSubscriptions.delete({
|
||
|
userId: user.id,
|
||
|
endpoint: ps.endpoint,
|
||
|
});
|
||
|
});
|