mirror of
https://github.com/unraid/api.git
synced 2026-04-26 01:08:53 -05:00
fix: servers subscription not having data
This commit is contained in:
@@ -153,7 +153,7 @@ export const resolvers = {
|
||||
online: () => true,
|
||||
info: () => ({}),
|
||||
vms: () => ({}),
|
||||
server(_: unknown, { name }, context: Context) {
|
||||
async server(_: unknown, { name }, context: Context) {
|
||||
ensurePermission(context.user, {
|
||||
resource: 'servers',
|
||||
action: 'read',
|
||||
|
||||
@@ -38,7 +38,9 @@ export const subscribeToServers = (apiKey: string) => {
|
||||
});
|
||||
|
||||
// Update subscribers
|
||||
pubsub.publish('servers', JSON.stringify(data.servers));
|
||||
pubsub.publish('servers', {
|
||||
servers: data.servers
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user