mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
11 lines
325 B
TypeScript
11 lines
325 B
TypeScript
import { StatusCandidate } from '../../sync/types';
|
|
import { BaseModel, canSync } from '..';
|
|
|
|
const toStatusCandidate = (doc: BaseModel): StatusCandidate => ({
|
|
key: doc._id,
|
|
name: doc.name || '',
|
|
document: doc,
|
|
});
|
|
|
|
export const getStatusCandidates = (docs: BaseModel[]) => docs.filter(canSync).map(toStatusCandidate);
|