This file contains 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
export async function setUser(user) { | |
const primaryKey = ["users", user.id]; | |
const byColorKey = ["users_by_favorite_color", user.favoriteColor, user.id]; | |
const oldUser = await getUser(user.id); | |
const atomic = kv.atomic(); | |
if (oldUser) { | |
if (oldUser.favoriteColor !== user.favoriteColor) { |
This file contains 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 kv = await Deno.openKv(); | |
interface Choice { | |
id: string; | |
poll: string; | |
title: string; | |
} | |
export async function setChoice(choice: Choice) { | |
const primaryKey = ["choices", choice.id]; |
This file contains 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
{ | |
"Resources": { | |
"ZoneHostedZoneB23BB523": { | |
"Type": "AWS::Route53::HostedZone", | |
"Properties": { | |
"Name": "martin.dev.trip.pictures." | |
}, | |
"Metadata": { | |
"aws:cdk:path": "TripPics/Zone/HostedZone/Resource" | |
} |