Skip to content

Commit

Permalink
use GET
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Nov 21, 2024
1 parent 396cf2e commit 880d543
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion next-enterprise/expirator-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ await new Promise((resolve, reject) => {
for (const tag of event.tags) {
url.searchParams.append('tag', tag)
}
fetch(url, {method: 'POST'})
fetch(url)
.then((res) => {
if (!res.ok) {
throw new TypeError('Failed', {cause: res.statusText})
Expand Down
2 changes: 1 addition & 1 deletion next-enterprise/src/app/api/expire-tags/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {expireTag} from 'next/cache'

export async function POST(request: Request) {
export async function GET(request: Request) {
const url = new URL(request.url)
const secret = url.searchParams.get('secret')
if (secret !== process.env.SECRET) {
Expand Down

0 comments on commit 880d543

Please sign in to comment.