-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO.txt
45 lines (36 loc) · 1014 Bytes
/
TODO.txt
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
# TODO
Change the uri to follow this syntax
GET /{model}
GET /{model}/{id} => Shows the editor
POST /{model}/{id}/update => Updates the model
POST /{model}/{id}/delete => Deletes the model
POST /{model}/{id}/create => Creates the model
Optionally add a json API:
GET /api/{model}
GET /api/{model}/{id}
GET /papers?[tag|citer|citee|author]={val}
GET /api/papers?[tag|citer|citee|author]={val}
GET /authors?paper={id}
GET /api/authors?paper={id}
GET /tags?paper={id}
GET /api/tags?paper={id}
server/
routes.go
run.go
- run()
- setup()
# Optionally
Abstract out all the dao methods, probably like
func DaoQuery(table int, query, args ...interface{}) {
results := db.Query(query, args)
switch table {
case 1:
return ReadPapers(results)
case 2:
return ReadTags(results)
case 3:
return ReadUsers(results)
default:
log.Fatal("Bad table enum int")
}
}