Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 2x 2x 1x 2x 1x | import { apiDeleteAuth, apiPutAuth } from './api';
import type {
RegisterPushDeviceRequest,
RegisterPushDeviceResponse,
} from '@/models/pushDevice';
export function registerPushDevice(
installationID: string,
data: RegisterPushDeviceRequest,
token: string,
): Promise<RegisterPushDeviceResponse> {
return apiPutAuth<RegisterPushDeviceResponse>(
`/me/push-devices/${installationID}`,
data,
token,
);
}
export function unregisterPushDevice(
installationID: string,
token: string,
): Promise<void> {
return apiDeleteAuth<void>(`/me/push-devices/${installationID}`, token);
}
|