Skip to content

Commit ba11720

Browse files
committed
fix(swagger): model swapped between afk_enabled endpoints
1 parent 2e98d87 commit ba11720

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/api/router/manager.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ func (m *Manager) ListenAndServe(ctx context.Context, address string, port int,
8383
mux.HandleFunc("GET /v1/devices/{hostname}/config", withAuth.Wrap(m.getDeviceConfig))
8484

8585
api.Get("/v1/devices/*/afk_enabled").
86-
HasResponseModel(http.StatusOK, rest.ModelOf[device.AFKEnabledResponse]()).
86+
HasResponseModel(http.StatusOK, rest.ModelOf[map[string]device.AFKEnabledResponse]()).
8787
HasTags([]string{"devices"}).HasDescription("Give all devices that should run AFK")
8888
api.Get("/v1/devices/{hostname}/afk_enabled").
89-
HasResponseModel(http.StatusOK, rest.ModelOf[map[string]device.AFKEnabledResponse]()).
89+
HasResponseModel(http.StatusOK, rest.ModelOf[device.AFKEnabledResponse]()).
9090
HasPathParameter("hostname", rest.PathParam{Description: "Device hostname", Type: rest.PrimitiveTypeString}).
9191
HasTags([]string{"devices"}).HasDescription("Tells if a device should run AFK")
9292

0 commit comments

Comments
 (0)