|
|
@@ -1,7 +1,7 @@ |
|
|
|
import { application, resource, validation as v } from '@modal-sh/yasumi'; |
|
|
|
import { http } from '@modal-sh/yasumi/backend'; |
|
|
|
import { randomUUID } from 'crypto'; |
|
|
|
import {JsonLinesDataSource} from '@modal-sh/yasumi-data-source-file-jsonl'; |
|
|
|
import { JsonLinesDataSource } from '@modal-sh/yasumi-data-source-file-jsonl'; |
|
|
|
import { constants } from 'http2'; |
|
|
|
import TAGALOG from './languages/tl'; |
|
|
|
|
|
|
@@ -17,8 +17,8 @@ const User = resource( |
|
|
|
v.object({ |
|
|
|
email: v.string([v.email()]), |
|
|
|
password: v.string(), |
|
|
|
createdAt: v.datelike(), |
|
|
|
updatedAt: v.datelike(), |
|
|
|
createdAt: v.date(), |
|
|
|
updatedAt: v.date(), |
|
|
|
}) |
|
|
|
) |
|
|
|
.name('User') |
|
|
@@ -59,9 +59,10 @@ const app = application({ |
|
|
|
const backend = app.createBackend({ |
|
|
|
dataSource: new JsonLinesDataSource(), |
|
|
|
}) |
|
|
|
.use(http.httpExtender) |
|
|
|
.throwsErrorOnDeletingNotFound(); |
|
|
|
|
|
|
|
const server = backend.createHttpServer({ |
|
|
|
const server = backend.createServer('http', { |
|
|
|
basePath: '/api', |
|
|
|
}) |
|
|
|
.defaultErrorHandler((_req, res) => () => { |
|
|
|