linter-wider
All checks were successful
deploy / test (push) Has been skipped
deploy / Update templates on Mailgun (push) Successful in 21s

This commit is contained in:
Untone 2024-02-16 22:53:42 +03:00
parent 7f85c543ed
commit 1a393c75c5
6 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,7 @@
import { renderPage } from 'vike/server' import { renderPage } from 'vike/server'
export const config = { export const config = {
runtime: 'edge', runtime: 'edge'
} }
export default async function handler(request) { export default async function handler(request) {
const { url, cookies } = request const { url, cookies } = request

View File

@ -15,7 +15,7 @@ export default async function handler(req, res) {
from: 'Discours Feedback Robot <robot@discours.io>', from: 'Discours Feedback Robot <robot@discours.io>',
to: 'welcome@discours.io', to: 'welcome@discours.io',
subject, subject,
text, text
} }
try { try {

View File

@ -13,18 +13,18 @@ export default async (req, res) => {
const response = await mg.lists.members.createMember('newsletter@discours.io', { const response = await mg.lists.members.createMember('newsletter@discours.io', {
address: email, address: email,
subscribed: true, subscribed: true,
upsert: 'yes', upsert: 'yes'
}) })
return res.status(200).json({ return res.status(200).json({
success: true, success: true,
message: 'Email was added to newsletter list', message: 'Email was added to newsletter list',
response: JSON.stringify(response), response: JSON.stringify(response)
}) })
} catch (error) { } catch (error) {
return res.status(400).json({ return res.status(400).json({
success: false, success: false,
message: error.message, message: error.message
}) })
} }
} }

View File

@ -12,15 +12,15 @@
"dev": "vite", "dev": "vite",
"e2e": "npx playwright test --project=chromium", "e2e": "npx playwright test --project=chromium",
"fix": "npm run check:code:fix && stylelint **/*.{scss,css} --fix", "fix": "npm run check:code:fix && stylelint **/*.{scss,css} --fix",
"format": "npx @biomejs/biome format src/. --write", "format": "npx @biomejs/biome format . --write",
"hygen": "HYGEN_TMPLS=gen hygen", "hygen": "HYGEN_TMPLS=gen hygen",
"postinstall": "npm run codegen", "postinstall": "npm run codegen",
"check:code": "npx @biomejs/biome check src --log-kind=compact --verbose", "check:code": "npx @biomejs/biome check . --log-kind=compact --verbose",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:code:fix": "npx @biomejs/biome check src --log-kind=compact --verbose --apply-unsafe", "check:code:fix": "npx @biomejs/biome check . --log-kind=compact --verbose --apply-unsafe",
"lint": "npm run lint:code && stylelint **/*.{scss,css}", "lint": "npm run lint:code && stylelint **/*.{scss,css}",
"lint:code": "npx @biomejs/biome lint src --log-kind=compact --verbose", "lint:code": "npx @biomejs/biome lint . --log-kind=compact --verbose",
"lint:code:fix": "npx @biomejs/biome lint src --apply-unsafe --log-kind=compact --verbose", "lint:code:fix": "npx @biomejs/biome lint . --apply-unsafe --log-kind=compact --verbose",
"lint:styles": "stylelint **/*.{scss,css}", "lint:styles": "stylelint **/*.{scss,css}",
"lint:styles:fix": "stylelint **/*.{scss,css} --fix", "lint:styles:fix": "stylelint **/*.{scss,css} --fix",
"preview": "vite preview", "preview": "vite preview",

View File

@ -9,7 +9,7 @@ const pagesTitles = {
'/about/donate': /Дискурс/, '/about/donate': /Дискурс/,
'/authors': /Дискурс/, '/authors': /Дискурс/,
'/topics': /Дискурс/, '/topics': /Дискурс/,
'/inbox': /Дискурс/, '/inbox': /Дискурс/
} }
Object.keys(pagesTitles).forEach((res: string) => { Object.keys(pagesTitles).forEach((res: string) => {

View File

@ -11,7 +11,7 @@ import { chromium } from 'playwright'
'http://localhost:3000/about/donate', 'http://localhost:3000/about/donate',
'http://localhost:3000/authors', 'http://localhost:3000/authors',
'http://localhost:3000/topics', 'http://localhost:3000/topics',
'http://localhost:3000/inbox', 'http://localhost:3000/inbox'
] ]
// Loop through the pages and visit each one // Loop through the pages and visit each one