add delete spaceurl delete route
This commit is contained in:
parent
1ab9d78736
commit
04e022f4d8
3 changed files with 30 additions and 1 deletions
|
|
@ -98,6 +98,19 @@ func readSpaceurl() []SpaceUrl {
|
|||
return result
|
||||
}
|
||||
|
||||
func deleteSpaceurl(String id) {
|
||||
session, err := mgo.Dial(config.MongoDbServer)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer session.Close()
|
||||
|
||||
session.SetMode(mgo.Monotonic, true)
|
||||
|
||||
c := session.DB(config.MongoDbDatabase).C("spaceurl")
|
||||
c.Remove(bson.M{"_id": id})
|
||||
}
|
||||
|
||||
func readCalendar() []Calendar {
|
||||
session, err := mgo.Dial(config.MongoDbServer)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue