Created
November 15, 2019 15:37
-
-
Save Altreus/7ae23f15c26345e72516b5c64d7a65b1 to your computer and use it in GitHub Desktop.
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
use Cro::HTTP::Router; | |
use LibUUID; | |
use Database; | |
use Red; | |
unit package Controller::Transactions; | |
# Remove this for success | |
my $*RED-DB = database "SQLite", :database<./pg.db>; | |
our sub routes { | |
route { | |
post -> { | |
my $t = Transaction.^create; | |
content 'application/json' => { | |
id => $t.id, | |
closed => $t.closed, | |
}; | |
} | |
} | |
} |
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
===SORRY!=== | |
This type (NQPMu) does not support associative operations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment