Skip to content
Snippets Groups Projects
app.js 262 B
Newer Older
exports.getBundles = async ctx => {
	const user = await ctx.services.authService.getUser()
	if (user == null) {
		ctx.body = {
			bundles: [],
		}
	} else {
		console.log(user.id)

		const bundles = await user.getBundleCodes()
		ctx.body = {
			bundles,
		}
	}
}