(data: PlainMessage<GetUserInstructionsRequest>)
| 194 | }; |
| 195 | |
| 196 | export const getUserInstructions = async (data: PlainMessage<GetUserInstructionsRequest>) => { |
| 197 | if (!apiclient.hasToken()) { |
| 198 | throw new Error("No token"); |
| 199 | } |
| 200 | const response = await apiclient.get("/users/@self/instructions", data, { |
| 201 | ignoreErrorToast: true, |
| 202 | }); |
| 203 | return fromJson(GetUserInstructionsResponseSchema, response); |
| 204 | }; |
| 205 | |
| 206 | export const upsertUserInstructions = async (data: PlainMessage<UpsertUserInstructionsRequest>) => { |
| 207 | if (!apiclient.hasToken()) { |
no test coverage detected