Bugfix search page (Band)

This commit is contained in:
2024-12-21 21:05:06 +01:00
parent 7884f5c57a
commit ade0f8cd88
5 changed files with 1459 additions and 39 deletions

View File

@@ -12,9 +12,6 @@ export class AccountRole extends Model {
@Column @Column
privilegeAdminPanel: boolean privilegeAdminPanel: boolean
@Column
privilegeFileAccess: boolean
// Relations // Relations
@HasMany(() => Account) @HasMany(() => Account)

View File

@@ -103,7 +103,7 @@ band.get("/", (req: Request, res: Response) => {
/** /**
* Get all information about one band * Get all information about one band
*/ */
band.get("/:name", (req: Request, res: Response) => { band.get("/band/:name", (req: Request, res: Response) => {
Band.findOne({ Band.findOne({
where: { where: {
name: { [Op.like]: req.params.name } name: { [Op.like]: req.params.name }
@@ -166,6 +166,8 @@ band.get("/:name", (req: Request, res: Response) => {
*/ */
band.get("/search", async (req: Request, res: Response) => { band.get("/search", async (req: Request, res: Response) => {
// Workaround, because SQLite can't handle stacked queries // Workaround, because SQLite can't handle stacked queries
console.log(1)
console.log(req.query.value)
let prompts = decodeURI(String(req.query.value)).split(";") let prompts = decodeURI(String(req.query.value)).split(";")
// On stacked prompts, execute last prompt // On stacked prompts, execute last prompt

View File

@@ -679,8 +679,7 @@
"id": 1, "id": 1,
"name": "User", "name": "User",
"privilegeBuy": true, "privilegeBuy": true,
"privilegeAdminPanel": false, "privilegeAdminPanel": false
"privilegeFileAccess": null
}, },
"payments": [ "payments": [
{ {
@@ -759,8 +758,8 @@
} }
}, },
"example": { "example": {
"username": "artists", "name": "artists",
"password": 41 "description": 41
} }
}, },
"file": { "file": {

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,7 @@ export const useSearchStore = defineStore("searchStore", {
// Check for exercise solution // Check for exercise solution
if (result.data.length != 0) { if (this.searchTerm.toUpperCase().includes("SELECT")) {
// Exercise 2.1 // Exercise 2.1
if (result.data[0].type != undefined && result.data[0].type == "table") { if (result.data[0].type != undefined && result.data[0].type == "table") {
exerciseStore.solveExercise(2, 1) exerciseStore.solveExercise(2, 1)
@@ -92,6 +92,7 @@ export const useSearchStore = defineStore("searchStore", {
} }
else { else {
// Normal behaviour
this.bands = result.data this.bands = result.data
} }
}) })