-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Site serves correct group for site, group v query
- Loading branch information
1 parent
456ceb6
commit c183d4b
Showing
11 changed files
with
410 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
// const gatewayHostWithProtocol = process.env.HM_BASE_URL | ||
// const gatewayHost = new URL(gatewayHostWithProtocol || '').hostname | ||
import {websiteClient} from '../client' | ||
|
||
export async function getSiteGroup(): Promise<{ | ||
groupEid: string | ||
groupEid?: string | ||
version?: string | null | ||
}> { | ||
// todo, query for site group | ||
const siteInfo = await websiteClient.getSiteInfo({}) | ||
return { | ||
groupEid: '8ctYvUJwv9kmpjCT4RjBeD', | ||
version: null, | ||
groupEid: siteInfo.groupId || undefined, | ||
version: siteInfo.groupVersion || null, | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
frontend/packages/shared/src/client/.generated/groups/v1alpha/website_connect.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts,import_extension=none" | ||
// @generated from file groups/v1alpha/website.proto (package com.mintter.groups.v1alpha, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import { GetSiteInfoRequest, InitializeServerRequest, InitializeServerResponse, PublicSiteInfo, PublishBlobsRequest, PublishBlobsResponse } from "./website_pb"; | ||
import { MethodKind } from "@bufbuild/protobuf"; | ||
|
||
/** | ||
* API service exposed by the website server. | ||
* It's exposed as gRPC over Libp2p. | ||
* | ||
* @generated from service com.mintter.groups.v1alpha.Website | ||
*/ | ||
export const Website = { | ||
typeName: "com.mintter.groups.v1alpha.Website", | ||
methods: { | ||
/** | ||
* Gets the public information about the website. | ||
* This information is also available as JSON over HTTP on `/.well-known/hypermedia-site`. | ||
* | ||
* @generated from rpc com.mintter.groups.v1alpha.Website.GetSiteInfo | ||
*/ | ||
getSiteInfo: { | ||
name: "GetSiteInfo", | ||
I: GetSiteInfoRequest, | ||
O: PublicSiteInfo, | ||
kind: MethodKind.Unary, | ||
}, | ||
/** | ||
* Initializes the server to become a website for a specific group. | ||
* | ||
* @generated from rpc com.mintter.groups.v1alpha.Website.InitializeServer | ||
*/ | ||
initializeServer: { | ||
name: "InitializeServer", | ||
I: InitializeServerRequest, | ||
O: InitializeServerResponse, | ||
kind: MethodKind.Unary, | ||
}, | ||
/** | ||
* Publishes blobs to the website. | ||
* | ||
* @generated from rpc com.mintter.groups.v1alpha.Website.PublishBlobs | ||
*/ | ||
publishBlobs: { | ||
name: "PublishBlobs", | ||
I: PublishBlobsRequest, | ||
O: PublishBlobsResponse, | ||
kind: MethodKind.Unary, | ||
}, | ||
} | ||
} as const; | ||
|
Oops, something went wrong.