Skip to content

Commit

Permalink
fix error with external sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
amborle committed Aug 20, 2019
1 parent e582eae commit b55df0d
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 123 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ _testmain.go

conf.json
/webapp/build
/bin
224 changes: 125 additions & 99 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/build_all_arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
cd "$scriptDir"
cd ..

VERSION=1.0.3
VERSION=1.0.4

export GO111MODULE=on

Expand Down
7 changes: 1 addition & 6 deletions link-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func getLink(w http.ResponseWriter, r *http.Request) {
s := GetEnv(r).Service

project, err := s.GetProjectByExternalLink(link)

if err != nil {
_ = render.Render(w, r, ErrInvalidRequest(errors.New("not found")))
return
Expand All @@ -35,12 +36,6 @@ func getLink(w http.ResponseWriter, r *http.Request) {
return
}

sub := s.GetSubscriptionByWorkspace(ws.ID)
if subHasExpired(sub) {
_ = render.Render(w, r, ErrInvalidRequest(errors.New("subscription has expired")))
return
}

extended, err := s.GetProjectExtendedByExternalLink(link)
if err != nil {
_ = render.Render(w, r, ErrInvalidRequest(errors.New("not found")))
Expand Down
2 changes: 1 addition & 1 deletion migrations/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions service_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion tmpl/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b55df0d

Please sign in to comment.