This file contains 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
DEBUG: yarn.lock needs updating (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
DEBUG: Updated 2 lock files (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
"updatedArtifacts": ["package-lock.json", "yarn.lock"] | |
DEBUG: 3 file(s) to commit (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
DEBUG: Committing files to branch renovate/react-helmet-6.x (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
DEBUG: Error commiting files (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
"err": { | |
"task": { | |
"commands": [ | |
"push", |
This file contains 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
module.exports = { | |
/* endpoint: 'https://api.github.com/', */ | |
token: 'xxx', | |
platform: 'github', | |
logLevel: 'debug', | |
onboardingConfig: { | |
extends: ['config:base'], | |
}, | |
repositories: ['julienp-test-org/gatsby-starter-blog'], | |
renovateFork: true, |
This file contains 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
// You're hosting an event, and the admission tickets are expensive. Groups of people are trying to cheat the system by using the same tickets multiple times. Stop them! | |
// 1) Create a constructor function called Ticket that takes one parameter, code, and creates a Ticket object. | |
// The Ticket object will have the following parameters: | |
// code : a string that stores the ticket code | |
// used : a boolean that stores whether or not the ticket has been used yet | |
// useTicket: a function registers that the ticket has been used and prevents reuse or tampering | |
// 2) Create a function called validTicket to check whether the ticket is valid and return true or false. For a ticket to be valid, | |
// the ticket code must match the correct code, and the ticket must be unused. |
This file contains 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
// Print out the grade-school multiplication table up to 12x12 | |
function multiplicationTable(maxValue) { | |
for (var i = 1; i <= maxValue; i++) { | |
let line | |
for (var j = 1; j <= maxValue; j++) { | |
line = line + ` ${j * i}`; | |
} | |
console.log(line) | |
} |
This file contains 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
/** rest of code above **/ | |
server.get("/post/:id", async (req, res) => { | |
const postId = req.params.id; | |
// Use the post API from prisma client | |
try { | |
const post = await prisma.post({ | |
id: postId | |
}); | |
const author = await prisma |
This file contains 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
/** rest of code above **/ | |
server.get("/posts", async (_req, res) => { | |
// Use the posts API from prisma client | |
try { | |
const posts = await prisma.posts({ | |
where: { | |
published: true | |
} | |
}); |
This file contains 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
/** rest of code above **/ | |
server.get("/post/:id", async (req, res) => { | |
const postId = req.params.id; | |
// Use the post API from prisma client | |
try { | |
const post = await prisma.post({ | |
id: postId | |
}); |
This file contains 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
/** rest of code above **/ | |
server.post("/post/publish/:id", async (req, res) => { | |
const postId = req.params.id; | |
// Use the updatePost API from prisma client | |
try { | |
const publishedPost = await prisma.updatePost({ | |
where: { | |
id: postId | |
}, |
This file contains 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
/** rest of code above **/ | |
server.post("/create/draft", async (req, res) => { | |
const { title, authorId } = req.body; | |
// Use the createPost API from prisma client | |
try { | |
const draftPost = await prisma.createPost({ | |
title, | |
author: { | |
connect: { |
This file contains 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
/** rest of code above **/ | |
server.get("/user/:id", async (req, res) => { | |
const userId = req.params.id; | |
// Use the user API from prisma client | |
try { | |
const user = await prisma.user({ | |
id: userId | |
}); |