Skip to content

Commit ce3a3d8

Browse files
nvh95ijjk
andauthored
Rename api in with-redis example (#33016)
Co-authored-by: JJ Kasper <[email protected]>
1 parent 0195a6f commit ce3a3d8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/with-redis/pages/api/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { v4 as uuidv4 } from 'uuid'
22

33
import redis from '../../lib/redis'
44

5-
export default async function upvote(req, res) {
5+
export default async function create(req, res) {
66
const { title } = req.body
77

88
if (!title) {

examples/with-redis/pages/api/features.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import redis from '../../lib/redis'
22

3-
export default async function upvote(req, res) {
3+
export default async function getAllFeatures(req, res) {
44
const features = (await redis.hvals('features'))
55
.map((entry) => JSON.parse(entry))
66
.sort((a, b) => b.score - a.score)

examples/with-redis/pages/api/subscribe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import redis from '../../lib/redis'
22

3-
export default async function upvote(req, res) {
3+
export default async function subscribe(req, res) {
44
const { email } = req.body
55

66
if (email && validateEmail(email)) {

0 commit comments

Comments
 (0)