Unverified Commit ce3a3d8e authored by Hung Viet Nguyen's avatar Hung Viet Nguyen Committed by GitHub

Rename api in with-redis example (#33016)

Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 0195a6f8
......@@ -2,7 +2,7 @@ import { v4 as uuidv4 } from 'uuid'
import redis from '../../lib/redis'
export default async function upvote(req, res) {
export default async function create(req, res) {
const { title } = req.body
if (!title) {
......
import redis from '../../lib/redis'
export default async function upvote(req, res) {
export default async function getAllFeatures(req, res) {
const features = (await redis.hvals('features'))
.map((entry) => JSON.parse(entry))
.sort((a, b) => b.score - a.score)
......
import redis from '../../lib/redis'
export default async function upvote(req, res) {
export default async function subscribe(req, res) {
const { email } = req.body
if (email && validateEmail(email)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment