Update index.js
Browse files
index.js
CHANGED
@@ -30,7 +30,6 @@ import { Database } from './database/database.js'
|
|
30 |
import { Readable } from "stream";
|
31 |
import { randomBytes } from "crypto";
|
32 |
import { AkenoaiJs } from "akenoaijs";
|
33 |
-
import mongoose from "mongoose";
|
34 |
|
35 |
import {
|
36 |
CheckMilWare,
|
@@ -130,15 +129,6 @@ const AllJsonReques = {
|
|
130 |
},
|
131 |
}
|
132 |
|
133 |
-
const apiKeySchema = new mongoose.Schema({
|
134 |
-
key: { type: String, required: true, unique: true },
|
135 |
-
owner: { type: Number, required: true, unique: true },
|
136 |
-
email: { type: String },
|
137 |
-
createdAt: { type: Date, default: Date.now },
|
138 |
-
expiresAt: { type: Date, required: true, index: { expires: 0 } }
|
139 |
-
});
|
140 |
-
|
141 |
-
const ApiKey = mongoose.model("ApiKey", apiKeySchema);
|
142 |
|
143 |
app.get("/api/v1/json/all", async (req, res) => {
|
144 |
res.json(AllJsonReques);
|
|
|
30 |
import { Readable } from "stream";
|
31 |
import { randomBytes } from "crypto";
|
32 |
import { AkenoaiJs } from "akenoaijs";
|
|
|
33 |
|
34 |
import {
|
35 |
CheckMilWare,
|
|
|
129 |
},
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
app.get("/api/v1/json/all", async (req, res) => {
|
134 |
res.json(AllJsonReques);
|