-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstudentdetails.post.hl
40 lines (34 loc) · 974 Bytes
/
studentdetails.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
/*
* Template for HTTP POST CRUD requests.
* This file was automatically generated using Magic's CRUDifier.
*/
.arguments
_id:long
stude_name:string
batch:string
admission_year:date
email_id:string
phone_no:string
linkedin:string
points:long
.description:Creates an item in your studentdetails 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
// 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:studentdetails
return-id:bool:false
values
// Returning result of above invoction to caller.
response.status.set:201
unwrap:x:+/*
return
result:success