chore: refactor service and backend to use REST

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-01-12 15:39:03 +02:00
parent 13346970b4
commit 1a38100a8e
27 changed files with 407 additions and 359 deletions
@@ -0,0 +1,37 @@
/*
* Copyright 2023 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
exports.up = async function up(knex) {
await knex.schema.createTable('notifications', table => {
table.uuid('id').primary();
table.string('userRef').notNullable();
table.string('title').notNullable();
table.text('description').notNullable();
table.text('link').notNullable();
table.text('icon').nullable();
table.text('image').nullable();
table.datetime('created').notNullable();
table.datetime('read').nullable();
table.boolean('saved').defaultTo(false).notNullable();
});
};
/**
* @param {import('knex').Knex} knex
*/
exports.down = async function down(knex) {
await knex.schema.dropTable('notifications');
};