Skip to content

Commit

Permalink
New route: /profile/set-privacy-mode for enabling privacy mode
Browse files Browse the repository at this point in the history
New route: /analytics/profile/:id for recording analytics
  • Loading branch information
NavidK0 committed Feb 1, 2021
1 parent 7772141 commit 71321e9
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 640 deletions.
27 changes: 18 additions & 9 deletions client/pages/u/_.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,19 @@ export default Vue.extend({
UserProfileView
},
asyncData(ctx: Context) {
async asyncData(ctx: Context) {
try {
const url = '/profile/' + ctx.route.path.replace('/u/', '');
const response = await ctx.$axios.$post(url, {
token: ctx.store.getters['auth/getToken']
});
const profile = response.profile;
return {
profileHandle: ctx.route.path.replace('/u/', '')
profileHandle: ctx.route.path.replace('/u/', ''),
profile
};
} catch (err) {
console.log('Error getting profile');
Expand Down Expand Up @@ -87,38 +96,38 @@ export default Vue.extend({
const profile: Profile = this.profile;
return {
title: profile.headline || '',
title: profile.headline ?? '',
meta: [
{
hid: 'title',
name: 'title',
content: profile.headline || ''
content: profile.headline ?? ''
},
{
hid: 'og:title',
name: 'og:title',
content: profile.headline || ''
content: profile.headline ?? ''
},
{
hid: 'twitter:title',
name: 'twitter:title',
content: profile.headline || ''
content: profile.headline ?? ''
},
{
hid: 'description',
name: 'description',
content: profile.subtitle || ''
content: profile.subtitle ?? ''
},
{
hid: 'og:description',
name: 'og:description',
content: profile.subtitle || ''
content: profile.subtitle ?? ''
},
{
hid: 'twitter:description',
name: 'twitter:description',
content: profile.subtitle || ''
content: profile.subtitle ?? ''
},
{
hid: 'og:image',
Expand Down
28 changes: 0 additions & 28 deletions server/scripts/models/Link.js

This file was deleted.

67 changes: 0 additions & 67 deletions server/scripts/models/Profile.js

This file was deleted.

32 changes: 0 additions & 32 deletions server/scripts/models/Theme.js

This file was deleted.

24 changes: 0 additions & 24 deletions server/scripts/models/User.js

This file was deleted.

20 changes: 0 additions & 20 deletions server/scripts/models/Visit.js

This file was deleted.

Loading

0 comments on commit 71321e9

Please sign in to comment.