2024-08-11 01:48:58 -07:00
|
|
|
import { getFeatures, MITRA, type Instance } from 'pl-api';
|
2022-04-24 12:28:07 -07:00
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
|
|
|
|
/** For solving bugs between API implementations. */
|
2024-05-12 16:18:04 -07:00
|
|
|
const getQuirks = createSelector([
|
2024-08-11 01:48:58 -07:00
|
|
|
(instance: Instance) => getFeatures(instance).version,
|
2024-05-12 16:18:04 -07:00
|
|
|
], (v) => ({
|
|
|
|
/**
|
|
|
|
* Apps are not supported by the API, and should not be created during login or registration.
|
|
|
|
* @see POST /api/v1/apps
|
|
|
|
* @see POST /oauth/token
|
|
|
|
*/
|
|
|
|
noApps: v.software === MITRA,
|
|
|
|
}));
|
2022-04-24 12:28:07 -07:00
|
|
|
|
2024-05-12 16:18:04 -07:00
|
|
|
export { getQuirks };
|