fix: servers subscription not having data

This commit is contained in:
Alexis Tyler
2020-10-15 17:06:29 +10:30
parent a5efa77933
commit 72cf07150b
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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',
+3 -1
View File
@@ -38,7 +38,9 @@ export const subscribeToServers = (apiKey: string) => {
});
// Update subscribers
pubsub.publish('servers', JSON.stringify(data.servers));
pubsub.publish('servers', {
servers: data.servers
});
}
});
};