This commit is contained in:
parent
f828ca4491
commit
cb51a4136f
167 changed files with 21485 additions and 21212 deletions
|
@ -1,11 +1,11 @@
|
|||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
|
||||
import type { HttpContext } from '@adonisjs/core/http';
|
||||
// import Person from 'App/Models/Person';
|
||||
import Dataset from 'App/Models/Dataset';
|
||||
import Dataset from '#app/Models/Dataset';
|
||||
import { StatusCodes } from 'http-status-codes';
|
||||
|
||||
// node ace make:controller Author
|
||||
export default class DatasetController {
|
||||
public async index({}: HttpContextContract) {
|
||||
public async index({}: HttpContext) {
|
||||
// select * from gba.persons
|
||||
// where exists (select * from gba.documents inner join gba.link_documents_persons on "documents"."id" = "link_documents_persons"."document_id"
|
||||
// where ("link_documents_persons"."role" = 'author') and ("persons"."id" = "link_documents_persons"."person_id"));
|
||||
|
@ -14,7 +14,7 @@ export default class DatasetController {
|
|||
return datasets;
|
||||
}
|
||||
|
||||
public async findAll({ response }: HttpContextContract) {
|
||||
public async findAll({ response }: HttpContext) {
|
||||
try {
|
||||
const datasets = await Dataset.query()
|
||||
.where('server_state', 'published')
|
||||
|
@ -29,7 +29,7 @@ export default class DatasetController {
|
|||
}
|
||||
}
|
||||
|
||||
public async findOne({ params }: HttpContextContract) {
|
||||
public async findOne({ params }: HttpContext) {
|
||||
const datasets = await Dataset.query()
|
||||
.where('publish_id', params.publish_id)
|
||||
.preload('titles')
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue