pleroma/packages/pl-fe/src/utils/quirks.ts

17 lines
486 B
TypeScript
Raw Normal View History

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. */
const getQuirks = createSelector([
(instance: Instance) => getFeatures(instance).version,
], (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
export { getQuirks };