Skip to content

Commit 9ed5c1a

Browse files
committed
fix api bug for sat info
1 parent 7a46b06 commit 9ed5c1a

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed

pkg/info/info.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ func (i *infoserver) getInfo(w http.ResponseWriter, r *http.Request) {
129129

130130
for _, n := range g.Nodes {
131131
s.Shells[g.Group-1].Sats[n.ID.ID.Id] = Node{
132-
Type: "sat",
132+
Type: "sat",
133+
Active: n.Active,
133134
Identifier: Identifier{
134135
Shell: n.ID.ID.Group,
135136
ID: n.ID.ID.Id,
136137
},
137-
Active: n.Active,
138138
}
139139
}
140140

@@ -178,12 +178,12 @@ func (i *infoserver) getShell(w http.ResponseWriter, r *http.Request) {
178178

179179
for _, n := range g.Nodes {
180180
s.Sats = append(s.Sats, Node{
181-
Type: "sat",
181+
Type: "sat",
182+
Active: n.Active,
182183
Identifier: Identifier{
183184
Shell: n.ID.ID.Group,
184185
ID: n.ID.ID.Id,
185186
},
186-
Active: n.Active,
187187
})
188188
}
189189

@@ -235,7 +235,8 @@ func (i *infoserver) getSat(w http.ResponseWriter, r *http.Request) {
235235
}
236236

237237
s := Node{
238-
Type: "sat",
238+
Type: "sat",
239+
Active: n.Active,
239240
Identifier: Identifier{
240241
Shell: n.ID.ID.Group,
241242
ID: n.ID.ID.Id,

proto/celestial/celestial.pb.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/celestial/celestial_grpc.pb.go

+32-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)