Skip to content

Commit

Permalink
Rename api in with-redis example (#33016)
Browse files Browse the repository at this point in the history
Co-authored-by: JJ Kasper <[email protected]>
  • Loading branch information
nvh95 and ijjk authored Jan 5, 2022
1 parent 0195a6f commit ce3a3d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/with-redis/pages/api/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-redis/pages/api/features.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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)
Expand Down
2 changes: 1 addition & 1 deletion examples/with-redis/pages/api/subscribe.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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)) {
Expand Down

0 comments on commit ce3a3d8

Please sign in to comment.