Changes
This commit is contained in:
parent
9eac960763
commit
da9196f389
22 changed files with 302 additions and 76 deletions
|
@ -1,6 +1,6 @@
|
|||
package device
|
||||
|
||||
import "nutfactory.org/Matrix/utils"
|
||||
import "git.nutfactory.org/hoernschen/Matrix/utils"
|
||||
|
||||
func New(name string) (err error, device *Device) {
|
||||
err, id := utils.CreateUUID()
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
"nutfactory.org/Matrix/utils/database"
|
||||
"git.nutfactory.org/hoernschen/Matrix/utils/database"
|
||||
)
|
||||
|
||||
func CreateDevice(device *Device, userId string) (err error) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"nutfactory.org/Matrix/config"
|
||||
"nutfactory.org/Matrix/utils"
|
||||
"git.nutfactory.org/hoernschen/Matrix/config"
|
||||
"git.nutfactory.org/hoernschen/Matrix/utils"
|
||||
)
|
||||
|
||||
func InitServerSigningKey() (err error) {
|
||||
|
@ -50,6 +50,7 @@ func GetServerSigningKeyHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Use Function
|
||||
func getVerifyKey(server string, id string) (key []byte, err error) {
|
||||
if val, ok := config.VerifyKeys[server][id]; ok {
|
||||
key = val
|
||||
|
|
|
@ -3,7 +3,7 @@ package device
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"nutfactory.org/Matrix/utils/database"
|
||||
"git.nutfactory.org/hoernschen/Matrix/utils/database"
|
||||
)
|
||||
|
||||
func CreateKey(key *Key, deviceId string) (err error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue