Changeset 3208473
- Timestamp:
- 12/16/2024 10:31:44 AM (16 months ago)
- Location:
- ai-summarizer/tags/1.0.0
- Files:
-
- 3 edited
-
ai-summarizer.php (modified) (1 diff)
-
trunk/includes/assets/ai-summarizer.js (modified) (2 diffs)
-
trunk/readme.md (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ai-summarizer/tags/1.0.0/ai-summarizer.php
r3205629 r3208473 7 7 * Plugin URI: https://sobold.co.uk/ 8 8 * Description: A WordPress plugin that integrates with AWS Bedrock to generate AI-powered summaries of post content. 9 * Version: 1.0. 09 * Version: 1.0.1 10 10 * Author: Santosh <santosh@soboldltd.com> 11 11 * Author URI: https://sobold.co.uk/team/ -
ai-summarizer/tags/1.0.0/trunk/includes/assets/ai-summarizer.js
r3205622 r3208473 288 288 * @returns {Object} - The summary response or an error 289 289 */ 290 // async function makeFrontSummaryRequest(data) { 291 // try { 292 // const response = await fetch(aiSummarizer.rest_url_get_summary, { 293 // method: "GET", 294 // headers: { 295 // "Content-Type": "application/json", 296 // "X-WP-Nonce": aiSummarizer.nonce, 297 // }, 298 // body: JSON.stringify(data), 299 // }); 300 // return await response.json(); 301 // } catch (error) { 302 // console.error("Front summary request failed:", error); 303 // return { success: false, error }; 304 // } 305 // } 306 290 307 async function makeFrontSummaryRequest(data) { 291 308 try { 292 const response = await fetch(aiSummarizer.rest_url_get_summary, { 309 // Convert data object to query parameters 310 const queryParams = new URLSearchParams(data).toString(); 311 const urlWithParams = `${aiSummarizer.rest_url_get_summary}?${queryParams}`; 312 313 const response = await fetch(urlWithParams, { 293 314 method: "GET", 294 315 headers: { … … 296 317 "X-WP-Nonce": aiSummarizer.nonce, 297 318 }, 298 body: JSON.stringify(data),299 319 }); 320 300 321 return await response.json(); 301 322 } catch (error) { -
ai-summarizer/tags/1.0.0/trunk/readme.md
r3208443 r3208473 91 91 - REST API routes for summarization and summary approval. 92 92 93 ### 1.0.1 94 95 - Fix: Update `makeFrontSummaryRequest` to use query parameters for GET requests instead of a body. 96 93 97 ## License 94 98
Note: See TracChangeset
for help on using the changeset viewer.