update the cookie consent control.
This commit is contained in:
@ -16,10 +16,20 @@ namespace Oqtane.Services
|
||||
|
||||
private string ApiUrl => CreateApiUrl("CookieConsent");
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> CanTrackAsync()
|
||||
public async Task<bool> IsActionedAsync()
|
||||
{
|
||||
return await GetJsonAsync<bool>($"{ApiUrl}/CanTrack");
|
||||
return await GetJsonAsync<bool>($"{ApiUrl}/IsActioned");
|
||||
}
|
||||
|
||||
public async Task<bool> CanTrackAsync(bool optOut)
|
||||
{
|
||||
return await GetJsonAsync<bool>($"{ApiUrl}/CanTrack?optout=" + optOut);
|
||||
}
|
||||
|
||||
public async Task<string> CreateActionedCookieAsync()
|
||||
{
|
||||
var cookie = await GetStringAsync($"{ApiUrl}/CreateActionedCookie");
|
||||
return cookie ?? string.Empty;
|
||||
}
|
||||
|
||||
public async Task<string> CreateConsentCookieAsync()
|
||||
@ -27,5 +37,11 @@ namespace Oqtane.Services
|
||||
var cookie = await GetStringAsync($"{ApiUrl}/CreateConsentCookie");
|
||||
return cookie ?? string.Empty;
|
||||
}
|
||||
|
||||
public async Task<string> WithdrawConsentCookieAsync()
|
||||
{
|
||||
var cookie = await GetStringAsync($"{ApiUrl}/WithdrawConsentCookie");
|
||||
return cookie ?? string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user