From 36d58cd133b58491774b9f90c65c2208405c0b86 Mon Sep 17 00:00:00 2001 From: RWOverdijk Date: Sun, 17 Jan 2016 23:24:42 +0100 Subject: [PATCH] feat(decorator): Added @endpoint() decorator --- src/decorator/endpoint.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/decorator/endpoint.js diff --git a/src/decorator/endpoint.js b/src/decorator/endpoint.js new file mode 100644 index 00000000..d8eab6e0 --- /dev/null +++ b/src/decorator/endpoint.js @@ -0,0 +1,16 @@ +import {OrmMetadata} from '../orm-metadata'; + +/** + * @todo add docblocks + * @todo update documentation + * @todo update aurelia-auth + * @todo update swan cli with skeleton + * + * @param entityEndpoint + * @return {Function} + */ +export function endpoint(entityEndpoint) { + return function(target) { + OrmMetadata.forTarget(target).put('endpoint', entityEndpoint); + }; +}