Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Changes that I implemented for the data reset stuff.
- Changes to /addon/setup
- If data needs to be reset, it returns:
- { success: false, reason: 'reset-required' }
- Changes to /addon/push
- If data needs to be reset, it returns:
- { success: false, reason: 'reset-required' }
- When the above happens, you have to stop collecting data (stop the engines), reset the add-on state (except username/password) and then call the /addon/reset method.
- The /addon/reset method needs the same POST data as /addon/setup:
- { version: 1 }
- It will reset data immediately and then clear the internal reset-required flag for the user.
- The add-on can now do its initial upload as usual.
- To test this, connect to mysql:
- mysql --user=fxhome --password=fxhome fxhome
- select id from users where username = 'max@mozilla.com'; // replace with your account name
- insert into UserProperties (user_id, name, value) values (your user id, 'reset-required', 'true');
- Let me know if you have questions.
- S.
Add Comment
Please, Sign In to add comment