Kurt/revert discord to attempt deploy (#598)

* Force netlify build

builds are being canceled even though there are changes

* Revert "Upgrade packages (#594)"

This reverts commit 5531f2e0c1.

* Revert "Discord chat bot to announce projects (#590)"

This reverts commit 90fece9598.

* Revert "Force netlify build"

This reverts commit 315ebf0c59.

* Make sure project title is robust
This commit was merged in pull request #598.
This commit is contained in:
Kurt Hutten
2022-01-19 20:54:43 +11:00
committed by GitHub
parent 844a1f6961
commit 861b8374bf
9 changed files with 2357 additions and 3296 deletions

View File

@@ -12,8 +12,6 @@ import {
} from 'src/services/helpers'
import { requireAuth } from 'src/lib/auth'
import { requireOwnership, requireProjectOwnership } from 'src/lib/owner'
import { sendDiscordMessage } from 'src/lib/discord'
export const projects = ({ userName }) => {
if (!userName) {
@@ -245,19 +243,7 @@ export const updateProjectImages = async ({
const [updatedProject] = await Promise.all([
projectPromise,
imageDestroyPromise,
]).then(async (result) => {
const { userName } = await db.user.findUnique({
where: { id: project.userId },
})
sendDiscordMessage([
`${userName} just added an image to their ${project.cadPackage} project:`,
` => ${project.title}`,
``,
`Check it out, leave a comment, make them feel welcome!`,
`https://cadhub.xyz/u/${userName}/${project.title}`
].join('\n'), `https://res.cloudinary.com/irevdev/image/upload/c_scale,w_700/v1/${mainImage}`)
return result
})
])
return updatedProject
}