Skip to content

Commit 5da8a6e

Browse files
authored
Merge pull request #24 from Acode-Foundation/fix/persist-supported-editor-on-publish
fix(plugin): persist supported_editor when creating a plugin
2 parents 4eb6309 + f7a7177 commit 5da8a6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/apis/plugin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,10 @@ router.post('/', async (req, res) => {
461461
insert.push([Plugin.CHANGELOGS, req.body.changelogs]);
462462
}
463463

464+
if (req.body?.supported_editor && ['ace', 'cm', 'all'].includes(req.body.supported_editor)) {
465+
insert.push([Plugin.SUPPORTED_EDITOR, req.body.supported_editor]);
466+
}
467+
464468
await Plugin.insert(...insert);
465469

466470
savePlugin(pluginId, pluginZip, icon);

0 commit comments

Comments
 (0)