@tthr/vue 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nuxt/module.ts CHANGED
@@ -45,7 +45,7 @@ export default defineNuxtModule<TetherModuleOptions>({
45
45
 
46
46
  // Read env vars at build time
47
47
  const apiKey = process.env.TETHER_API_KEY || '';
48
- const url = options.url || process.env.TETHER_URL || 'https://api.tether.strands.gg';
48
+ const url = options.url || process.env.TETHER_URL || 'https://tether-api.strands.gg';
49
49
  const projectId = options.projectId || process.env.TETHER_PROJECT_ID || '';
50
50
 
51
51
  // Server-side config (includes API key - never exposed to client)
@@ -251,8 +251,11 @@ async function handleCreateComment(postId: string) {
251
251
 
252
252
  try {
253
253
  await createComment.mutate({
254
+ id: crypto.randomUUID(),
254
255
  postId,
255
256
  content: newCommentText.value.trim(),
257
+ authorId: 'demo-user',
258
+ createdAt: new Date().toISOString(),
256
259
  });
257
260
  newCommentText.value = '';
258
261
  // Refresh comments for this post
@@ -295,8 +298,12 @@ async function handleCreatePost() {
295
298
 
296
299
  try {
297
300
  await createPost.mutate({
301
+ id: crypto.randomUUID(),
298
302
  title: newPostTitle.value.trim(),
299
303
  content: '',
304
+ authorId: 'demo-user',
305
+ createdAt: new Date().toISOString(),
306
+ updatedAt: new Date().toISOString(),
300
307
  });
301
308
  newPostTitle.value = '';
302
309
  await posts.refetch();
@@ -11,7 +11,7 @@ export default defineEventHandler(async (event) => {
11
11
 
12
12
  // Get API key from runtime config (populated from TETHER_API_KEY env var)
13
13
  const apiKey = config.tether?.apiKey || process.env.TETHER_API_KEY;
14
- const url = config.tether?.url || process.env.TETHER_URL || 'http://localhost:3001';
14
+ const url = config.tether?.url || process.env.TETHER_URL || 'https://tether-api.strands.gg';
15
15
  const projectId = config.tether?.projectId || process.env.TETHER_PROJECT_ID;
16
16
 
17
17
  if (!apiKey) {
@@ -11,7 +11,7 @@ export default defineEventHandler(async (event) => {
11
11
 
12
12
  // Get API key from runtime config (populated from TETHER_API_KEY env var)
13
13
  const apiKey = config.tether?.apiKey || process.env.TETHER_API_KEY;
14
- const url = config.tether?.url || process.env.TETHER_URL || 'http://localhost:3001';
14
+ const url = config.tether?.url || process.env.TETHER_URL || 'https://tether-api.strands.gg';
15
15
  const projectId = config.tether?.projectId || process.env.TETHER_PROJECT_ID;
16
16
 
17
17
  if (!apiKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tthr/vue",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Tether Vue/Nuxt SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",