Skip to content

Commit

Permalink
Replace Publication.Zenodo to DOI
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Oct 20, 2024
1 parent 51b0446 commit c7e424d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func DocsHandler(c *gin.Context) {
curl 'https://zenodo.org/api/deposit/depositions?access_token=<KEY>'
curl 'https://zenodo.org/api/deposit/depositions/<123>?access_token=<KEY>'
*/
zurl := srvConfig.Config.Publication.Zenodo.URL
token := srvConfig.Config.Publication.Zenodo.AccessToken
zurl := srvConfig.Config.DOI.URL

Check failure on line 40 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
token := srvConfig.Config.DOI.AccessToken

Check failure on line 41 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
rurl := fmt.Sprintf("%s/deposit/depositions?access_token=%s", zurl, token)
var doc DocParams
if err := c.ShouldBindUri(&doc); err == nil {
Expand Down Expand Up @@ -84,8 +84,8 @@ func CreateHandler(c *gin.Context) {
--data-raw '{}'
*/
// create new deposit
zurl := srvConfig.Config.Publication.Zenodo.URL
token := srvConfig.Config.Publication.Zenodo.AccessToken
zurl := srvConfig.Config.DOI.URL

Check failure on line 87 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
token := srvConfig.Config.DOI.AccessToken

Check failure on line 88 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
rurl := fmt.Sprintf("%s/deposit/depositions?access_token=%s", zurl, token)
if Verbose > 0 {
log.Println("request", rurl)
Expand Down Expand Up @@ -136,8 +136,8 @@ func AddHandler(c *gin.Context) {
}

// create new deposit
zurl := srvConfig.Config.Publication.Zenodo.URL
token := srvConfig.Config.Publication.Zenodo.AccessToken
zurl := srvConfig.Config.DOI.URL

Check failure on line 139 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
token := srvConfig.Config.DOI.AccessToken

Check failure on line 140 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
rurl := fmt.Sprintf("%s/files/%s/%s?access_token=%s", zurl, doc.Bucket, doc.FileName, token)
if Verbose > 0 {
log.Println("request", rurl)
Expand Down Expand Up @@ -192,8 +192,8 @@ func UpdateHandler(c *gin.Context) {
c.JSON(http.StatusBadRequest, rec)
return
}
zurl := srvConfig.Config.Publication.Zenodo.URL
token := srvConfig.Config.Publication.Zenodo.AccessToken
zurl := srvConfig.Config.DOI.URL

Check failure on line 195 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
token := srvConfig.Config.DOI.AccessToken

Check failure on line 196 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
rurl := fmt.Sprintf("%s/deposit/depositions/%d?access_token=%s", zurl, doc.Id, token)

// read payload
Expand Down Expand Up @@ -234,8 +234,8 @@ func PublishHandler(c *gin.Context) {
c.JSON(http.StatusBadRequest, rec)
return
}
zurl := srvConfig.Config.Publication.Zenodo.URL
token := srvConfig.Config.Publication.Zenodo.AccessToken
zurl := srvConfig.Config.DOI.URL

Check failure on line 237 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
token := srvConfig.Config.DOI.AccessToken

Check failure on line 238 in handlers.go

View workflow job for this annotation

GitHub Actions / build

srvConfig.Config.DOI undefined (type *"github.com/CHESSComputing/golib/config".SrvConfig has no field or method DOI)
rurl := fmt.Sprintf("%s/deposit/depositions/%d/actions/publish?access_token=%s", zurl, doc.Id, token)

// place HTTP request to zenodo upstream server
Expand Down

0 comments on commit c7e424d

Please sign in to comment.