🔎 Added a searchIssue endpoint
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const mongoose = require("mongoose");
|
||||
var mexp = require("mongoose-elasticsearch-xp").v7;
|
||||
const paginate = require("mongoose-paginate-v2");
|
||||
|
||||
const { Client } = require("@elastic/elasticsearch");
|
||||
|
||||
export const eSClient = new Client({
|
||||
|
||||
78
models/comicvine.metadata.model.ts
Normal file
78
models/comicvine.metadata.model.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
const mongoose = require("mongoose");
|
||||
const Things = mongoose.Schema({
|
||||
api_detail_url: String,
|
||||
id: Number,
|
||||
name: String,
|
||||
site_detail_url: String,
|
||||
count: String,
|
||||
});
|
||||
const Issue = mongoose.Schema({
|
||||
api_detail_url: String,
|
||||
id: Number,
|
||||
name: String,
|
||||
issue_number: String,
|
||||
});
|
||||
const VolumeInformation = mongoose.Schema({
|
||||
aliases: Array,
|
||||
api_detail_url: String,
|
||||
characters: [Things],
|
||||
concepts: [Things],
|
||||
count_of_issues: String,
|
||||
date_added: String,
|
||||
date_last_updated: String,
|
||||
deck: String,
|
||||
description: String,
|
||||
first_issue: Issue,
|
||||
id: Number,
|
||||
image: {
|
||||
icon_url: String,
|
||||
medium_url: String,
|
||||
screen_url: String,
|
||||
screen_large_url: String,
|
||||
small_url: String,
|
||||
super_url: String,
|
||||
thumb_url: String,
|
||||
tiny_url: String,
|
||||
original_url: String,
|
||||
image_tags: String,
|
||||
},
|
||||
|
||||
issues: [
|
||||
{
|
||||
api_detail_url: String,
|
||||
id: Number,
|
||||
name: String,
|
||||
issue_number: String,
|
||||
site_detail_url: String,
|
||||
},
|
||||
],
|
||||
last_issue: Issue,
|
||||
locations: [Things],
|
||||
name: String,
|
||||
objects: [Things],
|
||||
people: [Things],
|
||||
publisher: {
|
||||
api_detail_url: String,
|
||||
id: Number,
|
||||
name: String,
|
||||
},
|
||||
site_detail_url: String,
|
||||
start_year: String,
|
||||
});
|
||||
|
||||
const ComicVineMetadata = mongoose.Schema({
|
||||
aliases: [String],
|
||||
api_detail_url: String,
|
||||
cover_date: String,
|
||||
date_added: String,
|
||||
date_last_updated: String,
|
||||
deck: String,
|
||||
description: String,
|
||||
has_staff_review: Boolean,
|
||||
id: Number,
|
||||
name: String,
|
||||
resource_type: String,
|
||||
volumeInformation: VolumeInformation,
|
||||
});
|
||||
|
||||
export default ComicVineMetadata;
|
||||
Reference in New Issue
Block a user