mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 07:01:27 -07:00
testing generic deploy
This commit is contained in:
@@ -6,8 +6,8 @@ import { withNotFound, withOnError } from '@repo/hono-helpers'
|
||||
import type { App } from './context'
|
||||
|
||||
/**
|
||||
* Ported from the C# `CommerceController`. The class `[Route("commerce")]` prefix
|
||||
* maps to this worker's subdomain, so method routes are served bare.
|
||||
* Commerce routes. The `commerce` prefix maps to this worker's subdomain, so
|
||||
* method routes are served bare.
|
||||
*/
|
||||
const app = new Hono<App>()
|
||||
.use(
|
||||
@@ -25,8 +25,8 @@ const app = new Hono<App>()
|
||||
|
||||
.get('/', (c) => c.json({ service: 'commerce', status: 'ok' }))
|
||||
|
||||
// Whether the player has ever spent money. The C# returns NotFound(), but the
|
||||
// client treats that 404 as an error, so we return `false` (no purchases).
|
||||
// Whether the player has ever spent money. A 404 here makes the client treat
|
||||
// it as an error, so we return `false` (no purchases).
|
||||
.get('/purchase/v1/hasspentmoney', (c) => c.json(false))
|
||||
|
||||
export default app
|
||||
|
||||
@@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest'
|
||||
|
||||
import '../../commerce.app'
|
||||
|
||||
const ORIGIN = 'https://commerce.rec.djdevin.net'
|
||||
const ORIGIN = 'https://example.com'
|
||||
|
||||
describe('commerce endpoints', () => {
|
||||
it('GET / reports service status', async () => {
|
||||
|
||||
Reference in New Issue
Block a user