Add auth controls and headers
This commit is contained in:
@@ -26,7 +26,7 @@ export const up = async (db: Kysely<DatabaseTables>): Promise<void> => {
|
||||
.addColumn('signature', 'text', (col) => col.notNull())
|
||||
.addPrimaryKeyConstraint('pk_resource_data', [ 'resource_id', 'public_key' ])
|
||||
.execute();
|
||||
|
||||
|
||||
// Table for authed requests
|
||||
// We will store the signature and the timestamp of the request, and we will clear out rows that are older than our msTimeout for our auth
|
||||
await db.schema
|
||||
@@ -45,8 +45,8 @@ export const up = async (db: Kysely<DatabaseTables>): Promise<void> => {
|
||||
*/
|
||||
export const down = async (db: Kysely<DatabaseTables>): Promise<void> => {
|
||||
await db.schema.dropTable('resource_data').ifExists()
|
||||
.execute();
|
||||
.execute();
|
||||
|
||||
await db.schema.dropTable('authed_requests').ifExists()
|
||||
.execute();
|
||||
.execute();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user