This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const fetchComments = async ({ | |
| postId, | |
| host | |
| }: RequestInfo): Promise<Result<Array<Comments.Schema>, string>> => { | |
| try { | |
| const comments = await db(Comments.Table.name) | |
| .select(everything(Comments.Table)) | |
| .join( | |
| Posts.Table.name, | |
| `${Comments.Table.name}.${Comments.Table.cols.post_id}`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Required<T> = { | |
| [K in keyof T]: Schema<T> | |
| } | |
| interface ObjectSchema<T> { | |
| type: 'object' | |
| required: Array<keyof T> | |
| properties: Required<T> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {- OVERVIEW ------------------------------------------------------ | |
| A "Tree" represents a binary tree. A "Node" in a binary tree | |
| always has two children. A tree can also be "Empty". Below I have | |
| defined "Tree" and a number of useful functions. | |
| This example also includes some challenge problems! | |
| -----------------------------------------------------------------} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--HEADER--> | |
| <header> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="twelve columns"> | |
| <nav> | |
| <ul> | |
| <li><a href="#">About</a></li> | |
| <li><a href="#">Work</a></li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Reaction Tester</title> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <link rel="stylesheet" href="main.css"> |
NewerOlder