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:
parent
27640dffc4
commit
72b14def6d
36 changed files with 1371 additions and 472 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue