Commit 4aaa0468 authored by nanahira's avatar nanahira

Migrate schema to Config

parent 8bca99f5
...@@ -104,7 +104,7 @@ class MyPicSource extends PicSource { ...@@ -104,7 +104,7 @@ class MyPicSource extends PicSource {
} }
export function apply(ctx: Context, config: Config) { export function apply(ctx: Context, config: PluginConfig) {
ctx.on('service/pics', () => ctx.pics.addSource(new MyPicSource(ctx, config), ctx)); ctx.on('service/pics', () => ctx.pics.addSource(new MyPicSource(ctx, config), ctx));
} }
``` ```
......
...@@ -9,7 +9,7 @@ Context.service('pics'); ...@@ -9,7 +9,7 @@ Context.service('pics');
export const name = 'pics'; export const name = 'pics';
const plugin = new PicsPlugin(); const plugin = new PicsPlugin();
export const schema = plugin.schema; export const Config = plugin.schema;
export function apply(ctx: Context, config: PicsPluginConfig) { export function apply(ctx: Context, config: PicsPluginConfig) {
ctx.plugin(plugin, config); ctx.plugin(plugin, config);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment