Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
9a641ee7
Commit
9a641ee7
authored
Jan 26, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected the use of POST vs PUT, POST creates something, PUT updates, got them mixed up
parent
3744bc32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
grafana
+1
-1
pkg/api/api.go
+6
-6
No files found.
grafana
@
ab7e2f89
Subproject commit a
0c8d3fa6fdf8eb3624af130fe12244f0e8d5e01
Subproject commit a
b7e2f89fb596d6adc9a28177feb97574e860ce7
pkg/api/api.go
View file @
9a641ee7
...
...
@@ -35,22 +35,22 @@ func Register(r *macaron.Macaron) {
// sign up
r
.
Get
(
"/signup"
,
Index
)
r
.
P
u
t
(
"/api/user/signup"
,
bind
(
m
.
CreateUserCommand
{}),
SignUp
)
r
.
P
os
t
(
"/api/user/signup"
,
bind
(
m
.
CreateUserCommand
{}),
SignUp
)
// authed api
r
.
Group
(
"/api"
,
func
()
{
// user
r
.
Group
(
"/user"
,
func
()
{
r
.
Get
(
"/"
,
GetUser
)
r
.
P
os
t
(
"/"
,
bind
(
m
.
UpdateUserCommand
{}),
UpdateUser
)
r
.
P
u
t
(
"/"
,
bind
(
m
.
UpdateUserCommand
{}),
UpdateUser
)
r
.
Post
(
"/using/:id"
,
SetUsingAccount
)
r
.
Get
(
"/accounts"
,
GetUserAccounts
)
})
// account
r
.
Group
(
"/account"
,
func
()
{
r
.
P
u
t
(
"/"
,
bind
(
m
.
CreateAccountCommand
{}),
CreateAccount
)
r
.
P
u
t
(
"/users"
,
bind
(
m
.
AddAccountUserCommand
{}),
AddAccountUser
)
r
.
P
os
t
(
"/"
,
bind
(
m
.
CreateAccountCommand
{}),
CreateAccount
)
r
.
P
os
t
(
"/users"
,
bind
(
m
.
AddAccountUserCommand
{}),
AddAccountUser
)
r
.
Get
(
"/users"
,
GetAccountUsers
)
r
.
Delete
(
"/users/:id"
,
RemoveAccountUser
)
})
...
...
@@ -58,8 +58,8 @@ func Register(r *macaron.Macaron) {
r
.
Group
(
"/tokens"
,
func
()
{
r
.
Combo
(
"/"
)
.
Get
(
GetTokens
)
.
P
u
t
(
bind
(
m
.
AddTokenCommand
{}),
AddToken
)
.
P
os
t
(
bind
(
m
.
UpdateTokenCommand
{}),
UpdateToken
)
P
os
t
(
bind
(
m
.
AddTokenCommand
{}),
AddToken
)
.
P
u
t
(
bind
(
m
.
UpdateTokenCommand
{}),
UpdateToken
)
r
.
Delete
(
"/:id"
,
DeleteToken
)
})
// Data sources
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment