Skip to content

Commit

Permalink
remove api 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ddvk committed Sep 24, 2024
1 parent 52c6d12 commit 863d5de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 329 deletions.
6 changes: 1 addition & 5 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/golang-jwt/jwt"
"github.com/juruen/rmapi/api/sync10"
"github.com/juruen/rmapi/api/sync15"
"github.com/juruen/rmapi/filetree"
"github.com/juruen/rmapi/model"
Expand Down Expand Up @@ -39,7 +38,6 @@ type UserToken struct {
type SyncVersion int

const (
Version10 SyncVersion = 10
Version15 SyncVersion = 15
)

Expand Down Expand Up @@ -71,7 +69,7 @@ func ParseToken(userToken string) (token *UserInfo, err error) {

token = &UserInfo{
User: claims.Auth0.Email,
SyncVersion: Version10,
SyncVersion: Version15,
}

scopes := strings.Fields(claims.Scopes)
Expand All @@ -89,8 +87,6 @@ func ParseToken(userToken string) (token *UserInfo, err error) {
// CreateApiCtx initializes an instance of ApiCtx
func CreateApiCtx(httpCtx *transport.HttpClientCtx, syncVerison SyncVersion) (ctx ApiCtx, err error) {
switch syncVerison {
case Version10:
return sync10.CreateCtx(httpCtx)
case Version15:
return sync15.CreateCtx(httpCtx)
default:
Expand Down
324 changes: 0 additions & 324 deletions api/sync10/api.go

This file was deleted.

0 comments on commit 863d5de

Please sign in to comment.