2023-11-21 16:56:43 +11:00
|
|
|
import RestAdapter from "discourse/adapters/rest";
|
|
|
|
|
|
|
|
|
|
export default class Adapter extends RestAdapter {
|
|
|
|
|
jsonMode = true;
|
|
|
|
|
|
|
|
|
|
basePath() {
|
|
|
|
|
return "/admin/plugins/discourse-ai/";
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-15 16:37:59 +11:00
|
|
|
pathFor(store, type, findArgs) {
|
|
|
|
|
// removes underscores which are implemented in base
|
|
|
|
|
let path =
|
|
|
|
|
this.basePath(store, type, findArgs) +
|
|
|
|
|
store.pluralize(this.apiNameFor(type));
|
|
|
|
|
return this.appendQueryParams(path, findArgs);
|
2023-11-21 16:56:43 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apiNameFor() {
|
|
|
|
|
return "ai-persona";
|
|
|
|
|
}
|
|
|
|
|
}
|