(data: StreamFeedGenerics['userType'])
| 915 | } |
| 916 | |
| 917 | async setUser(data: StreamFeedGenerics['userType']) { |
| 918 | if (this.usingApiSecret) { |
| 919 | throw new SiteError('This method can only be used client-side using a user token'); |
| 920 | } |
| 921 | |
| 922 | const body = { ...data }; |
| 923 | delete body.id; |
| 924 | |
| 925 | const user = await (this.currentUser as StreamUser<StreamFeedGenerics>).getOrCreate(body); |
| 926 | this.currentUser = user; |
| 927 | return user; |
| 928 | } |
| 929 | |
| 930 | og(url: string) { |
| 931 | return this.get<OGAPIResponse>({ |
no test coverage detected