Permissions issues on my deployment server... so I guess in-memory it
Some checks are pending
Deploy Encrypted Todo App / build-and-push (push) Has started running
Some checks are pending
Deploy Encrypted Todo App / build-and-push (push) Has started running
is!
This commit is contained in:
12
server.js
12
server.js
@ -124,12 +124,10 @@ app.get(
|
||||
const encryptedTodos = [];
|
||||
|
||||
for (const todo of todos) {
|
||||
const row = await todoService.db.execute(
|
||||
"SELECT encrypted, createdAt FROM todos WHERE todoGroupId = ? AND userId = ?",
|
||||
[todo.id, userId],
|
||||
);
|
||||
const todoKey = `${todo.id}_${userId}`;
|
||||
const todoData = todoService.todos.get(todoKey);
|
||||
|
||||
if (row.rows.length === 0) {
|
||||
if (!todoData) {
|
||||
console.warn(
|
||||
`No encrypted data found for todo ${todo.id} and user ${userId}`,
|
||||
);
|
||||
@ -138,8 +136,8 @@ app.get(
|
||||
|
||||
encryptedTodos.push({
|
||||
id: todo.id,
|
||||
encrypted: row.rows[0].encrypted,
|
||||
createdAt: row.rows[0].createdAt,
|
||||
encrypted: todoData.encrypted,
|
||||
createdAt: todoData.createdAt,
|
||||
participants: todo.participants,
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user