Migrate Starboard to new Plugin structure
This commit is contained in:
parent
a3d0ec03d9
commit
599a504b17
12 changed files with 443 additions and 0 deletions
12
backend/src/plugins/Starboard/util/preprocessStaticConfig.ts
Normal file
12
backend/src/plugins/Starboard/util/preprocessStaticConfig.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { PartialConfigSchema, defaultStarboardOpts } from "../types";
|
||||
import * as t from "io-ts";
|
||||
|
||||
export function preprocessStaticConfig(config: t.TypeOf<typeof PartialConfigSchema>) {
|
||||
if (config.boards) {
|
||||
for (const [name, opts] of Object.entries(config.boards)) {
|
||||
config.boards[name] = Object.assign({}, defaultStarboardOpts, config.boards[name]);
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue