WIP
parent
c88abc010e
commit
6b9209edad
|
@ -33,7 +33,7 @@ export interface RootFolderNode {
|
|||
}
|
||||
|
||||
/** === THIS WILL LIVE ON THE API === */
|
||||
interface FlatNode {
|
||||
export interface FlatNode {
|
||||
id: number;
|
||||
name_id: number;
|
||||
color: Color;
|
||||
|
@ -41,10 +41,10 @@ interface FlatNode {
|
|||
}
|
||||
|
||||
/** === THIS WILL LIVE ON THE API === */
|
||||
interface FlatNodeName {
|
||||
export interface FlatNodeName {
|
||||
id: number;
|
||||
value: string;
|
||||
parent_id: undefined | number;
|
||||
parent_id?: number;
|
||||
}
|
||||
|
||||
export const MOCKUP_SEQUENCES: Record<number, string> = {
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
import {
|
||||
FlatNode,
|
||||
FlatNodeName,
|
||||
RootFolderNode
|
||||
} from "./constants";
|
||||
|
||||
export function ingest(_folders: FlatNode[], _names: FlatNodeName[]): RootFolderNode {
|
||||
return { folders: [] };
|
||||
type X = Record
|
||||
export function ingest(_folders: FlatNode[], names: FlatNodeName[]): RootFolderNode {
|
||||
const output = { folders: [] };
|
||||
const y = names
|
||||
.map((x: FlatNodeName): Required<FlatNodeName> => ({ ...x, parent_id: x.parent_id || -1 }));
|
||||
return output;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue