mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: user can enable/disable a watchlist
This commit is contained in:
@@ -32,6 +32,18 @@ export async function postWatchlist(watchlist: WatchlistRequest) {
|
||||
return response.data
|
||||
}
|
||||
|
||||
export async function patchWatchlist(token: string, watchlist: Partial<WatchlistRequest>) {
|
||||
const response = await request<{ token: string }>({
|
||||
method: 'PATCH',
|
||||
url: 'watchlists/' + token,
|
||||
data: watchlist,
|
||||
headers: {
|
||||
'Content-Type': 'application/merge-patch+json'
|
||||
}
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
export async function deleteWatchlist(token: string): Promise<void> {
|
||||
await request({
|
||||
method: 'DELETE',
|
||||
|
||||
Reference in New Issue
Block a user