You've already forked openaccounting-server
mirror of
https://github.com/openaccounting/oa-server.git
synced 2025-12-09 00:50:59 +13:00
add api prefix option
This commit is contained in:
@@ -34,7 +34,7 @@ import (
|
||||
*
|
||||
*/
|
||||
|
||||
func Init() (*rest.Api, error) {
|
||||
func Init(prefix string) (*rest.Api, error) {
|
||||
rest.ErrorFieldName = "error"
|
||||
app := rest.NewApi()
|
||||
|
||||
@@ -74,7 +74,7 @@ func Init() (*rest.Api, error) {
|
||||
app.Use(auth)
|
||||
app.Use(version)
|
||||
|
||||
router, err := GetRouter(auth)
|
||||
router, err := GetRouter(auth, prefix)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user