1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

moving endpoints to new API (WIP)

This commit is contained in:
Harvey Kandola 2017-07-26 10:50:26 +01:00
parent 27640dffc4
commit 72b14def6d
36 changed files with 1371 additions and 472 deletions

View file

@ -19,11 +19,12 @@ import (
"github.com/documize/community/core/database"
"github.com/documize/community/core/env"
"github.com/documize/community/core/secrets"
"github.com/documize/community/domain"
"github.com/jmoiron/sqlx"
)
// InitRuntime prepares runtime using command line and environment variables.
func InitRuntime(r *env.Runtime) bool {
func InitRuntime(r *env.Runtime, s *domain.Store) bool {
// We need SALT to hash auth JWT tokens
if r.Flags.Salt == "" {
r.Flags.Salt = secrets.RandSalt()
@ -76,6 +77,9 @@ func InitRuntime(r *env.Runtime) bool {
}
}
// setup store based upon database type
AttachStore(r, s)
return true
}