Skip to content

Commit 1dc8024

Browse files
Daev MithranDaev Mithran
authored andcommitted
feat: Demo with agntcy
1 parent 3933117 commit 1dc8024

10 files changed

Lines changed: 2175 additions & 6 deletions

File tree

package-lock.json

Lines changed: 395 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"@verida/encryption-utils": "^3.0.1",
7979
"@verida/types": "^3.0.2",
8080
"@verida/vda-did-resolver": "^4.4.5",
81+
"agntcy-dir": "^0.5.6",
8182
"bcrypt": "^5.1.1",
8283
"bs58": "^6.0.0",
8384
"cookie-parser": "^1.4.7",

src/app.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { OrganisationController } from './controllers/admin/organisation.js';
3333
import { AccreditationController } from './controllers/api/accreditation.js';
3434
import { OperationController } from './controllers/api/operation.js';
3535
import { ProvidersController } from './controllers/api/providers.controller.js';
36+
import { AgntcyController } from './controllers/api/agntcy.js';
3637

3738
dotenv.config();
3839

@@ -405,6 +406,10 @@ class App {
405406
app.get('/admin/organisation/get', new OrganisationController().get);
406407
}
407408

409+
app.post('/record/publish', AgntcyController.recordPublishValidator, new AgntcyController().publishRecord);
410+
app.get('/record/search', AgntcyController.recordSearchValidator, new AgntcyController().searchRecord);
411+
app.get('/record/:cid', AgntcyController.recordGetValidator, new AgntcyController().getRecord);
412+
408413
// 404 for all other requests
409414
app.all('*', (_req, res) => res.status(StatusCodes.BAD_REQUEST).send('Bad request'));
410415
}

0 commit comments

Comments
 (0)