chore!: remove deprecated endpoints licenses.isEnterprise and licenses.get (#33470)
parent
b167db0b37
commit
3f9c3f1f52
@ -0,0 +1,6 @@ |
||||
--- |
||||
'@rocket.chat/rest-typings': major |
||||
'@rocket.chat/meteor': major |
||||
--- |
||||
|
||||
Removes deprecated endpoints `licenses.isEnterprise` and `licenses.get`. Moving forward use the endpoint `licenses.info.` |
||||
@ -1,8 +1,7 @@ |
||||
import type { OperationResult } from '@rocket.chat/rest-typings'; |
||||
import type { UseQueryResult } from '@tanstack/react-query'; |
||||
|
||||
import { useLicenseBase } from './useLicense'; |
||||
|
||||
export const useIsEnterprise = (): UseQueryResult<OperationResult<'GET', '/v1/licenses.isEnterprise'>> => { |
||||
export const useIsEnterprise = (): UseQueryResult<{ isEnterprise: boolean }> => { |
||||
return useLicenseBase({ select: (data) => ({ isEnterprise: Boolean(data?.license.license) }) }); |
||||
}; |
||||
|
||||
Loading…
Reference in new issue