ai/at
1
0

fix ozone

This commit is contained in:
2025-12-03 23:11:38 +09:00
parent a837c79f43
commit ce9abf1ef9
12 changed files with 251 additions and 177 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/service/index.js b/service/index.js
index 943c281..7721cd9 100644
index d5295a3..7721cd9 100644
--- a/service/index.js
+++ b/service/index.js
@@ -1,5 +1,7 @@
@@ -19,7 +19,7 @@ index 943c281..7721cd9 100644
const pkg = require('@atproto/ozone/package.json')
async function main() {
@@ -16,37 +19,48 @@ async function main() {
@@ -16,30 +19,48 @@ async function main() {
const frontendHandler = frontend.getRequestHandler()
await frontend.prepare()
// backend
@@ -41,19 +41,16 @@ index 943c281..7721cd9 100644
await db.close()
}
- const ozone = await OzoneService.create(config, secrets)
-
+ const server = await ozone.OzoneService.create(config, secrets)
// setup handlers
- ozone.app.get('/.well-known/ozone-metadata.json', (_req, res) => {
+ // setup handlers
+ server.app.get('/.well-known/ozone-metadata.json', (_req, res) => {
return res.json({
- did: ozone.ctx.cfg.service.did,
- url: ozone.ctx.cfg.service.publicUrl,
- publicKey: ozone.ctx.signingKey.did(),
+ return res.json({
+ did: server.ctx.cfg.service.did,
+ url: server.ctx.cfg.service.publicUrl,
+ publicKey: server.ctx.signingKey.did(),
})
})
+ })
+ })
// Note: We must use `use()` here. This should be the last middleware.
- ozone.app.use((req, res) => {
+ server.app.use((req, res) => {