Skip to content

Instantly share code, notes, and snippets.

@Altreus
Created November 15, 2019 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Altreus/7ae23f15c26345e72516b5c64d7a65b1 to your computer and use it in GitHub Desktop.
Save Altreus/7ae23f15c26345e72516b5c64d7a65b1 to your computer and use it in GitHub Desktop.
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,
};
}
}
}
===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