denali-js/denali-auth

View on GitHub
app/serializers/session.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { FlatSerializer } from 'denali';
import { kebabCase } from 'lodash';

export default class SessionSerializer extends FlatSerializer {

  attributes = [
    'token',
    'expiresAt'
  ]

  serializeAttributeName(name: string) {
    return kebabCase(name);
  }

}