Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
56a1603e
authored
2013-08-27 20:05:15 +0300
by
Arıl Bozoluk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Changed ObejctController to ObjectController
1 parent
f9297379
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
example/beeapi/controllers/default.go
example/beeapi/controllers/default.go
View file @
56a1603
...
...
@@ -6,11 +6,11 @@ import (
"github.com/astaxie/beego/example/beeapi/models"
)
type
Ob
ej
ctController
struct
{
type
Ob
je
ctController
struct
{
beego
.
Controller
}
func
(
this
*
Ob
ej
ctController
)
Post
()
{
func
(
this
*
Ob
je
ctController
)
Post
()
{
var
ob
models
.
Object
json
.
Unmarshal
(
this
.
Ctx
.
RequestBody
,
&
ob
)
objectid
:=
models
.
AddOne
(
ob
)
...
...
@@ -18,7 +18,7 @@ func (this *ObejctController) Post() {
this
.
ServeJson
()
}
func
(
this
*
Ob
ej
ctController
)
Get
()
{
func
(
this
*
Ob
je
ctController
)
Get
()
{
objectId
:=
this
.
Ctx
.
Params
[
":objectId"
]
if
objectId
!=
""
{
ob
,
err
:=
models
.
GetOne
(
objectId
)
...
...
@@ -34,7 +34,7 @@ func (this *ObejctController) Get() {
this
.
ServeJson
()
}
func
(
this
*
Ob
ej
ctController
)
Put
()
{
func
(
this
*
Ob
je
ctController
)
Put
()
{
objectId
:=
this
.
Ctx
.
Params
[
":objectId"
]
var
ob
models
.
Object
json
.
Unmarshal
(
this
.
Ctx
.
RequestBody
,
&
ob
)
...
...
@@ -48,7 +48,7 @@ func (this *ObejctController) Put() {
this
.
ServeJson
()
}
func
(
this
*
Ob
ej
ctController
)
Delete
()
{
func
(
this
*
Ob
je
ctController
)
Delete
()
{
objectId
:=
this
.
Ctx
.
Params
[
":objectId"
]
models
.
Delete
(
objectId
)
this
.
Data
[
"json"
]
=
"delete success!"
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment