This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is part of avahi. | |
| # | |
| # avahi is free software; you can redistribute it and/or modify it | |
| # under the terms of the GNU Lesser General Public License as | |
| # published by the Free Software Foundation; either version 2 of the | |
| # License, or (at your option) any later version. | |
| # | |
| # avahi is distributed in the hope that it will be useful, but WITHOUT | |
| # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // With claim-matching in the middleware (simpler - just returns claims needed) | |
| // generic | |
| // app-wide level claim | |
| apiRouter.post( | |
| '/api/v2/wallet/{walletId}/payout', | |
| postPayoutTransactionHandler, | |
| walletAuthorizer, | |
| (event) => { | |
| if (event.requestContext.authorizer?.context['risk'] > 100) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it("test", async () => { | |
| const org = new Organization(); | |
| org.users = Promise.resolve([]); | |
| org.compliances = []; | |
| const { publicKey } = new Keypair(); | |
| const user = new UserEntity(); | |
| user.id = "1"; | |
| user.organization = org; | |
| user.publicKey = publicKey.toString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable no-console */ | |
| import Ajv, { JTDDataType } from "ajv/dist/jtd"; | |
| import Joi from "joi"; | |
| import { z } from "zod"; | |
| import yup, { ValidationError } from "yup"; | |
| export type AuthResponse = { | |
| investorId: string; | |
| expiration: number; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo 'WE WILL CELAR YOU' | |
| sleep 1 | |
| echo 'clear' | |
| sleep 1 | |
| echo '-bash: clear: command not found' | |
| sleep 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express') | |
| const app = express() | |
| const port = 3000 | |
| const awsServerlessExpress = require('aws-serverless-express') | |
| const server = awsServerlessExpress.createServer(app) | |
| app.get('/', (request, response) => { | |
| response.send('Hello Medium universe!'); | |
| }); |