Skip to content

Commit

Permalink
developer can specify metered billing
Browse files Browse the repository at this point in the history
  • Loading branch information
dvargas92495 committed Jan 21, 2022
1 parent b3008c5 commit beeb062
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
- name: install
run: npm install
- name: build
run: npm run build
run: npm run build
- name: RoamJS Publish
uses: dvargas92495/roamjs-publish@0.2.5
uses: dvargas92495/roamjs-publish@0.4.3
with:
token: ${{ secrets.ROAMJS_DEVELOPER_TOKEN }}
source: build
path: developer
release_token: ${{ secrets.ROAMJS_RELEASE_TOKEN }}
email: dvargas92495@gmail.com
2 changes: 1 addition & 1 deletion lambdas/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const roamjsHeaders: Record<string, string> = {
Authorization: `Bearer ${Buffer.from(
`dvargas92495@gmail.com:${process.env.ROAMJS_DEVELOPER_TOKEN}`
).toString("base64")}`,
"x-roamjs-service": "developer",
"x-roamjs-extension": "developer",
};
export const ses = new AWS.SES({ apiVersion: "2010-12-01", credentials });
if (process.env.NODE_ENV === "development") {
Expand Down
2 changes: 2 additions & 0 deletions lambdas/developer-path_put.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Premium = {
description: string[];
name: string;
price: number;
usage?: "licensed" | "metered";
};

const updateDynamoEntry = async ({
Expand Down Expand Up @@ -76,6 +77,7 @@ const updateDynamoEntry = async ({
recurring: {
interval: "month",
interval_count: 1,
usage_type: premium.usage || "licensed",
},
})
.then((price) => price.id)
Expand Down

0 comments on commit beeb062

Please sign in to comment.