fix: can't findOneAnotherKey

This commit is contained in:
Siwoo Jeon 2023-11-30 20:51:50 +09:00
parent 6fc1183148
commit c14250aa3a
Signed by: migan
GPG key ID: C4151385FFD2082A
4 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "muffin-ai-arujak", "name": "muffin-ai-arujak",
"version": "2.0.0-78-oreo", "version": "2.0.0-79-oreo",
"main": "dist/index.js", "main": "dist/index.js",
"private": true, "private": true,
"dependencies": { "dependencies": {

View file

@ -64,8 +64,8 @@ export class LearnTable implements BaseTable<LearnData, string> {
data: any, data: any,
): Promise<LearnData[]> { ): Promise<LearnData[]> {
const [rows] = await this._database.execute<LearnData[]>( const [rows] = await this._database.execute<LearnData[]>(
'SELECT * FROM learn WHERE ? = ?;', `SELECT * FROM learn WHERE ${key} = ?;`,
[key, data], [data],
) )
return rows return rows
} }

View file

@ -60,8 +60,8 @@ export class NSFWContentTable implements BaseTable<NSFWData, number> {
data: any, data: any,
): Promise<NSFWData[]> { ): Promise<NSFWData[]> {
const [rows] = await this._database.execute<NSFWData[]>( const [rows] = await this._database.execute<NSFWData[]>(
'SELECT * FROM nsfw_content WHERE ? = ?;', `SELECT * FROM nsfw_content WHERE ${key} = ?;`,
[key, data], [data],
) )
return rows return rows
} }

View file

@ -69,8 +69,8 @@ export class StatementTable implements BaseTable<ResponseData, number> {
data: any, data: any,
): Promise<ResponseData[]> { ): Promise<ResponseData[]> {
const [rows] = await this._database.execute<ResponseData[]>( const [rows] = await this._database.execute<ResponseData[]>(
'SELECT * FROM statement WHERE ? = ?;', `SELECT * FROM statement WHERE ${key} = ?;`,
[key, data], [data],
) )
return rows return rows
} }