Now returns userId upon Register

This commit is contained in:
Lynixenn
2025-03-24 21:21:45 +01:00
parent 029fc10de7
commit 9e7039c72c
4 changed files with 82 additions and 55 deletions

View File

@@ -46,9 +46,10 @@ async function api_createPost(ctx: Context): Promise<void> {
}
// Create timestamp in the format expected by the database
const createdAt = `${Math.floor(Date.now() / 1000)}-${
new Date().toLocaleDateString("en-GB").split("/").join("-")
}`;
const createdAt = `${Math.floor(Date.now() / 1000)}-${new Date()
.toLocaleDateString("en-GB")
.split("/")
.join("-")}`;
const postId = await db_utils.createPost(
userId,
@@ -143,4 +144,4 @@ export {
api_getPostById,
api_likePost,
api_updatePost,
};
};