Migrate everything to pl-api
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@@ -2,7 +2,6 @@ import {
|
||||
Map as ImmutableMap,
|
||||
List as ImmutableList,
|
||||
Set as ImmutableSet,
|
||||
fromJS,
|
||||
} from 'immutable';
|
||||
import trimStart from 'lodash/trimStart';
|
||||
|
||||
@@ -37,18 +36,18 @@ const toSimplePolicy = (configs: ImmutableList<Config>): MRFSimple => {
|
||||
}
|
||||
};
|
||||
|
||||
const fromSimplePolicy = (simplePolicy: Policy): ImmutableList<Config> => {
|
||||
const mapper = ([key, hosts]: [key: string, hosts: ImmutableList<string>]) => fromJS({ tuple: [`:${key}`, hosts] });
|
||||
const fromSimplePolicy = (simplePolicy: Policy)=> {
|
||||
const mapper = ([key, hosts]: [key: string, hosts: ImmutableList<string>]) => ({ tuple: [`:${key}`, hosts.toJS()] });
|
||||
|
||||
const value = Object.entries(simplePolicy).map(mapper);
|
||||
|
||||
return ImmutableList([
|
||||
ImmutableMap({
|
||||
return [
|
||||
{
|
||||
group: ':pleroma',
|
||||
key: ':mrf_simple',
|
||||
value: ImmutableList(value),
|
||||
}),
|
||||
]);
|
||||
value: value,
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
const ConfigDB = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { List as ImmutableList, fromJS } from 'immutable';
|
||||
import { emojiReactionSchema } from 'pl-api';
|
||||
|
||||
import { normalizeStatus } from 'pl-fe/normalizers';
|
||||
import { emojiReactionSchema } from 'pl-fe/schemas';
|
||||
|
||||
import {
|
||||
sortEmoji,
|
||||
|
||||
Reference in New Issue
Block a user