fixed entityRef bug and added functionality to add community link

Signed-off-by: Lykke Axlin <lykkeaxlin@hotmail.com>

Co-authored-by: klaraab <klarabroman@live.se>
This commit is contained in:
Lykke Axlin
2021-09-20 16:18:07 +02:00
parent 578e5c566a
commit a3ff450a01
10 changed files with 47 additions and 16 deletions
+3 -1
View File
@@ -138,12 +138,13 @@ export async function createRouter(
router.put('/metadata', async (request, response) => {
const entityRef = request.headers.entity_ref;
const { name, announcement, status } = request.body;
const { name, announcement, status, community } = request.body;
const count = await db?.('public.metadata')
.where({ entity_ref: entityRef })
.update({
announcement: announcement,
community: community,
status: status,
});
@@ -154,6 +155,7 @@ export async function createRouter(
?.insert({
name: name,
entity_ref: entityRef,
community: community,
announcement: announcement,
status: status,
})