How to use the bookbrainz-data.Editor function in bookbrainz-data

To help you get started, we’ve selected a few bookbrainz-data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bookbrainz / bookbrainz-site / src / server / routes / achievement.js View on Github external
router.get('/admin', (req, res) => {
	const EditorJSONPromise = new Editor()
		.orderBy('name')
		.fetchAll()
		.then((editors) => {
			return editors.map((editor) => {
				const editorJSON = editor.toJSON();
				return {
					id: editorJSON.id,
					name: editorJSON.name
				}
			});
		});

	const AchievementJSONPromise = new AchievementType()
		.orderBy('name')
		.fetchAll()
		.then((achievements) => {