Now returns userId upon Register
This commit is contained in:
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user