This commit is contained in:
Timothy J. Baek 2024-10-01 17:46:56 -07:00
parent c5eb0a9732
commit c2732a0990
2 changed files with 5 additions and 9 deletions

View File

@ -9,6 +9,8 @@ Create Date: 2024-10-01 14:02:35.241684
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column, select
import json
revision = "6a39f3d8e55c"
down_revision = "c0fbf31ca0db"
@ -39,6 +41,7 @@ def upgrade():
column("user_id", sa.String()),
column("name", sa.String()),
column("title", sa.Text()),
column("content", sa.Text()),
column("timestamp", sa.BigInteger()),
)
@ -49,6 +52,7 @@ def upgrade():
document_table.c.user_id,
document_table.c.name,
document_table.c.title,
document_table.c.content,
document_table.c.timestamp,
)
)
@ -62,6 +66,7 @@ def upgrade():
description=doc.name,
meta={
"legacy": True,
"tags": json.loads(doc.content or "{}").get("tags", []),
},
name=doc.title,
created_at=doc.timestamp,

View File

@ -29,15 +29,6 @@
selectedIdx = 0;
}
type ObjectWithName = {
name: string;
};
const findByName = (obj: ObjectWithName, command: string) => {
const name = obj.name.toLowerCase();
return name.includes(command.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '');
};
export const selectUp = () => {
selectedIdx = Math.max(0, selectedIdx - 1);
};