github
1381 of 2780 branches covered (49.68%)
0 of 440 new or added lines in 15 files covered. (0.0%)
13875 of 77148 relevant lines covered (17.98%)
1.8 hits per line
NEW
|
import { axios } from '../axios'; |
|
NEW
|
import { registerRoute, urlBuilder } from '../utils'; |
× |
NEW
|
import { z } from '../zod'; |
× |
NEW
|
|
× |
NEW
|
export const REVOKE_ACCESS = '/oauth/client/{clientId}/revoke-access'; |
× |
NEW
|
|
× |
NEW
|
export const revokeAccessRoute = registerRoute({ |
× |
NEW
|
method: 'post', |
× |
NEW
|
path: REVOKE_ACCESS, |
× |
NEW
|
request: { |
× |
NEW
|
params: z.object({
|
× |
NEW
|
clientId: z.string(), |
× |
NEW
|
}), |
× |
NEW
|
}, |
× |
NEW
|
responses: {
|
× |
NEW
|
200: {
|
× |
NEW
|
description: 'Revoke access permission successfully', |
× |
NEW
|
}, |
× |
NEW
|
}, |
× |
NEW
|
tags: ['oauth'], |
× |
NEW
|
}); |
× |
NEW
|
|
× |
NEW
|
export const revokeAccess = async (clientId: string) => { |
× |
NEW
|
return axios.post<void>(urlBuilder(REVOKE_ACCESS, { clientId })); |
× |
NEW
|
}; |
× |