mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
adds getTopic to the new ProfilUpdate FhcAPIController
This commit is contained in:
@@ -39,7 +39,7 @@ class ProfilUpdate extends FHCAPI_Controller
|
||||
{
|
||||
parent::__construct([
|
||||
'getStatus' => self::PERM_LOGGED,
|
||||
'fotoSperre' => self::PERM_LOGGED,
|
||||
'getTopic' => self::PERM_LOGGED,
|
||||
|
||||
]);
|
||||
|
||||
@@ -94,6 +94,14 @@ class ProfilUpdate extends FHCAPI_Controller
|
||||
}
|
||||
|
||||
|
||||
public function getTopic()
|
||||
{
|
||||
if(!count(self::$TOPICS)){
|
||||
$this->terminateWithError('No topics found');
|
||||
}
|
||||
$this->terminateWithSuccess(self::$TOPICS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
return this.$fhcApi.get(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
`/Cis/ProfilUpdate/getTopic`,{});
|
||||
`/api/frontend/v1/ProfilUpdate/getTopic`,{});
|
||||
},
|
||||
|
||||
getProfilUpdateRequest: function () {
|
||||
|
||||
@@ -358,14 +358,13 @@ const profilApp = Vue.createApp({
|
||||
|
||||
await this.$fhcApi.factory.profilUpdate.getStatus()
|
||||
.then((response) => {
|
||||
console.log(response.data,"this is the response when we set the status")
|
||||
this.profilUpdateStates = response.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
Vue.$fhcapi.ProfilUpdate.getTopic()
|
||||
this.$fhcApi.factory.profilUpdate.getTopic()
|
||||
.then((response) => {
|
||||
this.profilUpdateTopic = response.data;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user