-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathorganisations.post.hl
45 lines (39 loc) · 1.05 KB
/
organisations.post.hl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Template for HTTP POST CRUD requests.
* This file was automatically generated using Magic's CRUDifier.
*/
.arguments
org_name:string
org_id:long
description:string
category:string
faculty_ad_name:string
_id:long
.description:Creates an item in your organisations table in your [generic|quiz_portal] database according to the specified arguments
.type:crud-create
// Verifying user is authorized to access endpoint.
auth.ticket.verify:root, admin
.foreign-keys
.
column:_id
table:studentdetails
foreign_column:_id
foreign_name:stude_name
long:bool:true
// Opening up database connection.
data.connect:[generic|quiz_portal]
database-type:mysql
// Parametrising our create invocation.
add:x:./*/data.create/*/values
get-nodes:x:@.arguments/*
// Creating our record.
data.create
database-type:mysql
table:organisations
return-id:bool:false
values
// Returning result of above invoction to caller.
response.status.set:201
unwrap:x:+/*
return
result:success