Compare commits
No commits in common. "8e0b4c29e1b5974fbbcdced827633ebe6d059a52" and "0cbb96f23c33d3b67d7a75251c70a7ca1fa2bc27" have entirely different histories.
8e0b4c29e1
...
0cbb96f23c
3 changed files with 6 additions and 6 deletions
|
@ -11,7 +11,7 @@ export default class ArticleRoutes {
|
|||
|
||||
/** GET: /api/articles/[path] */
|
||||
async getArticle(ctx) {
|
||||
let res = await ctx.db.safeCallProc('common.article_get_single', [ctx.params.path])
|
||||
let res = await ctx.db.safeCallProc('article_get_single', [ctx.params.path])
|
||||
|
||||
let out = {
|
||||
article: parseArticle(res.results[0][0]),
|
||||
|
@ -23,7 +23,7 @@ export default class ArticleRoutes {
|
|||
|
||||
/** GET: /api/auth/articles */
|
||||
async auth_getAllArticles(ctx) {
|
||||
let res = await ctx.db.safeCallProc('common.article_auth_get_all', [
|
||||
let res = await ctx.db.safeCallProc('article_auth_get_all', [
|
||||
ctx.state.auth_token,
|
||||
Math.max(ctx.query.get('page') || 1, 1),
|
||||
Math.min(ctx.query.get('per_page') || 10, 25)
|
||||
|
@ -101,7 +101,7 @@ export default class ArticleRoutes {
|
|||
}
|
||||
}
|
||||
console.log(params)
|
||||
let res = await ctx.db.safeCallProc('common.article_auth_get_update_create', params)
|
||||
let res = await ctx.db.safeCallProc('article_auth_get_update_create', params)
|
||||
|
||||
let out = {
|
||||
article: parseArticle(res.results[0][0]),
|
||||
|
|
|
@ -13,7 +13,7 @@ export default class AuthenticationRoutes {
|
|||
|
||||
/** GET: /api/authentication/login */
|
||||
async login(ctx) {
|
||||
let res = await ctx.db.safeCallProc('common.auth_login', [
|
||||
let res = await ctx.db.safeCallProc('dbo.common_auth_login', [
|
||||
ctx.req.body.email,
|
||||
ctx.req.body.password,
|
||||
])
|
||||
|
|
|
@ -2,7 +2,7 @@ import { parseFile } from '../file/util.mjs'
|
|||
import { parseArticle, parseArticles } from '../article/util.mjs'
|
||||
|
||||
export async function getTree(ctx) {
|
||||
let res = await ctx.db.safeCallProc('common.pages_get_tree', [])
|
||||
let res = await ctx.db.safeCallProc('pages_get_tree', [])
|
||||
let out = []
|
||||
let children = []
|
||||
let map = new Map()
|
||||
|
@ -27,7 +27,7 @@ export async function getTree(ctx) {
|
|||
}
|
||||
|
||||
export async function getPage(ctx, path, page = 0, per_page = 10) {
|
||||
let res = await ctx.db.safeCallProc('common.pages_get_single', [path, page, per_page])
|
||||
let res = await ctx.db.safeCallProc('pages_get_single', [path, page, per_page])
|
||||
|
||||
let articleMap = new Map()
|
||||
|
||||
|
|
Loading…
Reference in a new issue