Compare commits

..

2 commits

Author SHA1 Message Date
8e0b4c29e1 Merge remote-tracking branch 'origin/master' 2022-07-26 02:56:39 +00:00
f3ec968dbb Development 2022-07-26 02:56:07 +00:00
3 changed files with 6 additions and 6 deletions

View file

@ -11,7 +11,7 @@ export default class ArticleRoutes {
/** GET: /api/articles/[path] */ /** GET: /api/articles/[path] */
async getArticle(ctx) { async getArticle(ctx) {
let res = await ctx.db.safeCallProc('article_get_single', [ctx.params.path]) let res = await ctx.db.safeCallProc('common.article_get_single', [ctx.params.path])
let out = { let out = {
article: parseArticle(res.results[0][0]), article: parseArticle(res.results[0][0]),
@ -23,7 +23,7 @@ export default class ArticleRoutes {
/** GET: /api/auth/articles */ /** GET: /api/auth/articles */
async auth_getAllArticles(ctx) { async auth_getAllArticles(ctx) {
let res = await ctx.db.safeCallProc('article_auth_get_all', [ let res = await ctx.db.safeCallProc('common.article_auth_get_all', [
ctx.state.auth_token, ctx.state.auth_token,
Math.max(ctx.query.get('page') || 1, 1), Math.max(ctx.query.get('page') || 1, 1),
Math.min(ctx.query.get('per_page') || 10, 25) Math.min(ctx.query.get('per_page') || 10, 25)
@ -101,7 +101,7 @@ export default class ArticleRoutes {
} }
} }
console.log(params) console.log(params)
let res = await ctx.db.safeCallProc('article_auth_get_update_create', params) let res = await ctx.db.safeCallProc('common.article_auth_get_update_create', params)
let out = { let out = {
article: parseArticle(res.results[0][0]), article: parseArticle(res.results[0][0]),

View file

@ -13,7 +13,7 @@ export default class AuthenticationRoutes {
/** GET: /api/authentication/login */ /** GET: /api/authentication/login */
async login(ctx) { async login(ctx) {
let res = await ctx.db.safeCallProc('dbo.common_auth_login', [ let res = await ctx.db.safeCallProc('common.auth_login', [
ctx.req.body.email, ctx.req.body.email,
ctx.req.body.password, ctx.req.body.password,
]) ])

View file

@ -2,7 +2,7 @@ import { parseFile } from '../file/util.mjs'
import { parseArticle, parseArticles } from '../article/util.mjs' import { parseArticle, parseArticles } from '../article/util.mjs'
export async function getTree(ctx) { export async function getTree(ctx) {
let res = await ctx.db.safeCallProc('pages_get_tree', []) let res = await ctx.db.safeCallProc('common.pages_get_tree', [])
let out = [] let out = []
let children = [] let children = []
let map = new Map() let map = new Map()
@ -27,7 +27,7 @@ export async function getTree(ctx) {
} }
export async function getPage(ctx, path, page = 0, per_page = 10) { export async function getPage(ctx, path, page = 0, per_page = 10) {
let res = await ctx.db.safeCallProc('pages_get_single', [path, page, per_page]) let res = await ctx.db.safeCallProc('common.pages_get_single', [path, page, per_page])
let articleMap = new Map() let articleMap = new Map()