mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 10:29:17 +00:00
20 lines
431 B
Go
20 lines
431 B
Go
package util
|
|
|
|
import (
|
|
"github.com/Infisical/infisical-merge/packages/api"
|
|
"github.com/go-resty/resty/v2"
|
|
)
|
|
|
|
func GetProjectDetails(accessToken string, projectId string) (api.Project, error) {
|
|
httpClient := resty.New()
|
|
httpClient.SetAuthToken(accessToken).
|
|
SetHeader("Accept", "application/json")
|
|
|
|
res, err := api.CallGetProjectById(httpClient, projectId)
|
|
if err != nil {
|
|
return api.Project{}, err
|
|
}
|
|
|
|
return res, nil
|
|
}
|