mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 05:27:48 +00:00
misc: finalized response
This commit is contained in:
@@ -486,9 +486,23 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
|
|||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
message: z.string(),
|
message: z.string(),
|
||||||
user: UsersSchema,
|
user: UsersSchema.pick({
|
||||||
organization: OrganizationsSchema,
|
username: true,
|
||||||
identity: IdentitiesSchema.extend({
|
firstName: true,
|
||||||
|
lastName: true,
|
||||||
|
email: true,
|
||||||
|
id: true,
|
||||||
|
superAdmin: true
|
||||||
|
}),
|
||||||
|
organization: OrganizationsSchema.pick({
|
||||||
|
id: true,
|
||||||
|
name: true,
|
||||||
|
slug: true
|
||||||
|
}),
|
||||||
|
identity: IdentitiesSchema.pick({
|
||||||
|
id: true,
|
||||||
|
name: true
|
||||||
|
}).extend({
|
||||||
credentials: z.object({
|
credentials: z.object({
|
||||||
token: z.string()
|
token: z.string()
|
||||||
}) // would just be Token AUTH for now
|
}) // would just be Token AUTH for now
|
||||||
|
|||||||
@@ -601,8 +601,8 @@ func CallGatewayHeartBeatV1(httpClient *resty.Client) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func CallBootstrapInstance(httpClient *resty.Client, request BootstrapInstanceRequest) (*BootstrapInstanceResponse, error) {
|
func CallBootstrapInstance(httpClient *resty.Client, request BootstrapInstanceRequest) (map[string]interface{}, error) {
|
||||||
var resBody BootstrapInstanceResponse
|
var resBody map[string]interface{}
|
||||||
response, err := httpClient.
|
response, err := httpClient.
|
||||||
R().
|
R().
|
||||||
SetResult(&resBody).
|
SetResult(&resBody).
|
||||||
@@ -618,5 +618,5 @@ func CallBootstrapInstance(httpClient *resty.Client, request BootstrapInstanceRe
|
|||||||
return nil, fmt.Errorf("CallBootstrapInstance: Unsuccessful response [%v %v] [status-code=%v] [response=%v]", response.Request.Method, response.Request.URL, response.StatusCode(), response.String())
|
return nil, fmt.Errorf("CallBootstrapInstance: Unsuccessful response [%v %v] [status-code=%v] [response=%v]", response.Request.Method, response.Request.URL, response.StatusCode(), response.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
return &resBody, nil
|
return resBody, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -661,20 +661,3 @@ type BootstrapInstanceRequest struct {
|
|||||||
Organization string `json:"organization"`
|
Organization string `json:"organization"`
|
||||||
Domain string `json:"domain"`
|
Domain string `json:"domain"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BootstrapInstanceResponseOrganization struct {
|
|
||||||
ID string `json:"id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BootstrapInstanceResponseIdentity struct {
|
|
||||||
ID string `json:"id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
Credentials interface{} `json:"credentials"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BootstrapInstanceResponse struct {
|
|
||||||
Message string `json:"message"`
|
|
||||||
Organization BootstrapInstanceResponseOrganization `json:"organization"`
|
|
||||||
Identity BootstrapInstanceResponseIdentity `json:"identity"`
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user